Commit Graph

392 Commits

Author SHA1 Message Date
Artem Borisov d7992e6feb Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1
All bluetooth-related changes were omitted because of our ancient incompatible bt stack.

Change-Id: I96440b7be9342a9c1adc9476066272b827776e64
2017-12-27 17:13:15 +03:00
Christian Gmeiner 03908608b9 drivers/leds/leds-ot200.c: fix error caused by shifted mask
commit 4b949b8af1 upstream.

During the development of this driver an in-house register documentation
was used.  The last week some integration tests were done and this
problem was found.  It turned out that the released register
documentation is wrong.

The fix is very simple: shift all masks by one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-07 12:49:13 -07:00
yetta_wu 8ca7624ab7 display: JDI: config backlight level when kernel init
1. Remove the gpio 26 config in board-flo-pmic.c
   since this gpio is already config as PWM function in LK.

2. Add pwm_init function implementation.

3. Config backlight level in pm8xxx_led_probe(), and remove the
   pwm_request() part in panel probe function.

Change-Id: I3ce71a9c792ce155bebabd80a24a8ff8fc361ae9
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:09:22 -07:00
xinchuan_wu 999e4db407 leds: remove unnecessary sysfs function.
Change-Id: I17938040002376b4bf80a4cefdc877cb8aea195f
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68558
Reviewed-by: Xinchuan Wu <Xinchuan_Wu@asus.com>
Tested-by: Xinchuan Wu <Xinchuan_Wu@asus.com>
2013-04-18 16:08:00 -07:00
xinchuan_wu 6a63a545dc leds: initialize leds-pm8xxx driver.
1. init leds-pm8xxxx
2. create three sysfs node to set parameter of led breathing behavior.

Change-Id: I5c2fc62a93889a7ed4197d3dc76fd495691d0175
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68439
Reviewed-by: Xinchuan Wu <Xinchuan_Wu@asus.com>
Tested-by: Xinchuan Wu <Xinchuan_Wu@asus.com>
2013-04-18 16:08:00 -07:00
Duy Truong 04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Mohan Pallaka 6552a042dc leds: leds-pm8xxx: Fix incorrect register macros
Some of the register macros are incorrectly used. Fix
them to be used properly.

(cherry picked from commit 58ff4051ab7ec40d516ca82b6287a230260fe2ee)
CRs-fixed: 421968

Change-Id: I392ab2e7074a432d152aaa846adbae54ad51ba3a
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
2013-03-07 15:24:27 -08:00
Amy Maloche 32b9ed9275 leds: leds-qpnp: Add QPNP PMIC led driver
QPNP (Qualcomm Plug N Play) LEDs driver is used for
controlling LEDs that are part of PMIC on Qualcomm reference
platforms. The PMIC is connected to Host processor via
SPMI bus. This driver supports various LED modules such as
WLED (white LED), RGB LED and flash LED. The first version of
the driver supports WLED and other features are added in the
next versions.

Change-Id: Ib2962c784cf566905f909faa0d46f8ebfee77b2d
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
(cherry picked from commit f3d5a06505faa2d7690ad48ce7bb5e32afb56df2)
2013-03-07 15:19:43 -08:00
Amy Maloche 751fecf8da leds: leds-pm8xxx: Add CABC support for backlight control
Content adaptive backlight control (CABC) support is needed to
control backlight by external PWM.  It can be enabled by setting
"cabc_en = true" in the platform data wled_cfg structure.

CRs-fixed: 379347

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
(cherry picked from commit c366d5bfc380183e1c4f9877b2c8558098bd4281)

Change-Id: Iae7940d25d8754ab539d5ce1fa3f78972b5222d1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:23 -08:00
Devin Kim dbe6237c19 leds: pm8xxx: change calculation of blinking period and on/off timing
Change-Id: I6adae65ae692c0a3d79bc45356ba8f880b3d00f3
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:44:58 -08:00
samin.ryu c9c2c61431 leds: pm8xxx: add calculation of blinking period and on/off
Change-Id: I718f506051ef367db08c7c8413e536cd5da22a95
2013-03-04 12:44:48 -08:00
samin.ryu 32680eaa3a leds: pm8xxx: change adjust brightness routine
add pwm_adjust_brightness field for current control.

Change-Id: If0ba79324fcf50334f88f006a8ff30b59b7d4982
2013-03-04 12:44:46 -08:00
Devin Kim 230093630f leds: pm8xxx: adjust the max brightness
This maps android brightness level 0 to 255 into driver backlight
level 0 to board max brightness with roudning

Change-Id: I760881fc25d7799afe55df8d213533c19432e81f
2013-03-04 12:44:06 -08:00
samin.ryu 21e0694a39 leds: pm8xxx: add pwm control sysfs files
PWM(frequency) is controlled by userspace

Change-Id: I6a3194de0b843841cdf56941dbcc43fcdc3a4f42
2013-03-04 12:44:05 -08:00
Amy Maloche 66dcf89ab8 drivers: leds-pm8xxx: enable low power mode for RGB LED
Disable RGB module when the LED is turned off and enable the
module when the LED is on.

CRs-fixed: 381623
Change-Id: I0861c6a38fff19c9499d169deaa02d05696bd148
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2013-02-27 18:17:10 -08:00
Mohan Pallaka f1d59b971e leds: msm-tricolor: Add support for tricolor leds
Add support for tricolor leds on Qualcomm's MSM
boards.

Change-Id: Ib05d6129f98cf67e7d208465a13cc6b1300c6277
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2013-02-27 18:16:18 -08:00
Mohan Pallaka 1bd8dbba38 leds: led-class: Remove deprecated functions
Replace deprecated function sprintf with its safer
counter part, snprintf.

Change-Id: Iffdbe2647d9b4ca228d8ad66ed85c159aaa027c6
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2013-02-25 11:31:10 -08:00
Praveen Chidambaram a534fafe39 leds: Add support to limit max_brightness of LCD
Make /sys/class/leds/lcd-brightness/max_brightness writable. This
will help limiting the max brightness and control the heat generated
by the LCD.

Change-Id: Ieb297f72f5fc26c19ca09c542e3a4140d01865d4
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
2013-02-25 11:31:09 -08:00
Benson Leung 9bacc3e41c add backlight driver in st1.5
BUG=NONE
TEST=Built and ran on st1.5
Signed-off-by: Horace Fu <horace.fu@quantatw.com>

CRs-Fixed: 245334
Change-Id: Ifc589ff9f9e41c9a7b5672001637f849eb0fde3c
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
2013-02-25 11:31:08 -08:00
Trilok Soni 7145c8edff leds: pmic8058: Add PMIC leds driver
Add PMIC8058 based keyboard backlight and low current leds driver.

keyboard backlight led supports upto 16 levels of backlight intensity,
which is mapped to 0..255 levels of brightness of led subsystem.

Three low current(40mA) led drivers of PMIC are also supported
in this driver.

CRs-Fixed: 211772
Change-Id: Ia65b083f6070666aaad95851c9b843332ce35c82
Signed-off-by: Trilok Soni <tsoni@qualcomm.com>
2013-02-25 11:31:07 -08:00
Mohan Pallaka 425bca22ad leds: leds-pmic-mpp: Add support for MPP connected LED
Add support for LEDs which are connected to PMIC MPPs.

Change-Id: Ib53510dbcb745e92e2100c1afc6dc2d94938fc85
CRs-fixed: 354967
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2013-02-25 11:31:06 -08:00
Trilok Soni 406324fb62 led: pm8xxx: Add pm8xxx leds driver
Add support for Qualcomm PMIC8XXX keyboard
backlight, flash and low current leds.

Change-Id: I460480e0c7f98da4cb27c76ca7ac65807df74a7f
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-02-25 11:31:05 -08:00
Stepan Moskovchenko 178aba2ef6 led: Bring in PMIC LED driver
Signed-off-by: Stepan Moskovchenko <stepanm@quicinc.com>
2013-02-25 11:31:04 -08:00
Mohan Pallaka df77beda7c leds: Add pdm based gpio led driver
Configure leds through Pulse Density Modulation
registers in MSM core.

Change-Id: Ia9fae2b8d7fea2b91004f33e5790aa725df7d88f
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2013-02-25 11:31:03 -08:00
Thomas Tsai e78ae0dfa8 leds: Add CPLD driver for LEDS
Signed-off-by: San Mehat <san@android.com>

leds: leds-cpld: Remove unused brightness setting

Signed-off-by: San Mehat <san@android.com>

leds: cpld: Make state change debugging conditional

Signed-off-by: Dima Zavin <dima@android.com>
2013-02-25 11:31:02 -08:00
Dan Carpenter 896c631494 drivers/leds/leds-lp5521.c: fix lp5521_read() error handling
commit 5bc9ad774c upstream.

Gcc 4.6.2 complains that:

  drivers/leds/leds-lp5521.c: In function `lp5521_load_program':
  drivers/leds/leds-lp5521.c:214:21: warning: `mode' may be used uninitialized in this function [-Wuninitialized]
  drivers/leds/leds-lp5521.c: In function `lp5521_probe':
  drivers/leds/leds-lp5521.c:788:5: warning: `buf' may be used uninitialized in this function [-Wuninitialized]
  drivers/leds/leds-lp5521.c:740:6: warning: `ret' may be used uninitialized in this function [-Wuninitialized]

These are real problems if lp5521_read() returns an error.  When that
happens we should handle it, instead of ignoring it or doing a bitwise
OR with all the other error codes and continuing.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Milo <Milo.Kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03 11:46:36 -08:00
Colin Cross ec0b571c19 Merge commit 'v3.4-rc7' into android-3.4 2012-05-14 16:41:02 -07:00
Arnd Bergmann b8cd742acf drivers/leds: correct __devexit annotations
__devexit functions are discarded without CONFIG_HOTPLUG, so they need
to be referenced carefully.  A __devexit function may also not be called
from a __devinit function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-10 15:06:44 -07:00
Colin Cross 957265bd4f Merge commit 'v3.4-rc4' into android-3.4 2012-04-27 14:03:45 -07:00
Nicolas Ferre 5509fea59b leds-atmel-pwm.c: Make pwmled_probe() __devinit
Commit 892a884 (leds: convert led platform drivers to module_platform_driver)
is omitting the section mismatch error: so change annotation of the probe
function to __devinit instead of __init.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
2012-04-17 16:29:31 +02:00
Arve Hjønnevåg d3bf8aef81 ledtrig-sleep: Add led trigger for sleep debugging.
Signed-off-by: Brian Swetland <swetland@google.com>
2012-04-09 13:53:13 -07:00
Linus Torvalds 30304e5a79 MFD changes for 3.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPcXgCAAoJEIqAPN1PVmxKh2oP/2Ns+dr4oOF8z+uqYG1oisJd
 CxBTC1Bi9gYBtpiMztPiHZWiQtVXoDgLbLkx6ooWH5dpwCdvU6TVBZUJp4wpELtx
 mMk5vJy4/INHgI0nk5wUOr76rNlQfIcK04f+LHBSG1iljUkoVR3FefVKgoyIP+Wv
 oiCeuCyQcYIUmG1pVt1x43OoS+2xgjWQA67AalLLRj1DOA5OkvUL7NGsrZ1iZTUh
 YHQJsK6ER3MgbFFEImtn10NNFwAEG04o6vi42DFW1O0awm6kmVoLjo46wS+UiKoh
 Vx8t5ZGvlYOZ1ZM9N5ETgQnihBt7cOhA3ivZar8h+WiYVTRJs1ZSkpmnlpmM4YY9
 RCZ5DRw3N39R0ezkNVGSr1Xn1vkysIiZI82frrJiPUYLKihsrBzj2Jq3O25iILCf
 Iyv7HBEJxAb3x0zlF6kPhaA8OW4dssaHTLNx5IJSOKwiwVLdm4RPyOHh9QVz++p/
 p0hvSQWK1MUruBbBrjF/FN+FidgK2iU0iDW/GoDwI7OKymSxg7sauLtp0cZpo6nT
 F+Ep6yl/uR5vxih4LSYFJOjoeKuwIo/x92H0qJ3UroaUs9DNJ7UCKchXXiQ1Wtnz
 tAAsWP1YsMxMzlMxqW5J9w4LJynJ8bqrC0L8+HWzIUwikA8wv8/47Pmc/vPW0Y3N
 5L7KMS8/iFCsS8rPmGeP
 =onDl
 -----END PGP SIGNATURE-----

Merge tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD changes from Samuel Ortiz:
 - 4 new drivers: Freescale i.MX on-chip Anatop, Ricoh's RC5T583 and
   TI's TPS65090 and TPS65217.
 - New variants support (8420, 8520 ab9540), cleanups and bug fixes for
   the abx500 and db8500 ST-E chipsets.
 - Some minor fixes and update for the wm8994 from Mark.
 - The beginning of a long term TWL cleanup effort coming from the TI
   folks.
 - Various fixes and cleanups for the s5m, TPS659xx, pm860x, and MAX8997
   drivers.

Fix up trivial conflicts due to duplicate patches and header file
cleanups (<linux/device.h> removal etc).

* tag 'mfd_3.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (97 commits)
  gpio/twl: Add DT support to gpio-twl4030 driver
  gpio/twl: Allocate irq_desc dynamically for SPARSE_IRQ support
  mfd: Detach twl6040 from the pmic mfd driver
  mfd: Replace twl-* pr_ macros by the dev_ equivalent and do various cleanups
  mfd: Micro-optimization on twl4030 IRQ handler
  mfd: Make twl4030 SIH SPARSE_IRQ capable
  mfd: Move twl-core IRQ allocation into twl[4030|6030]-irq files
  mfd: Remove references already defineid in header file from twl-core
  mfd: Remove unneeded header from twl-core
  mfd: Make twl-core not depend on pdata->irq_base/end
  ARM: OMAP2+: board-omap4-*: Do not use anymore TWL6030_IRQ_BASE in board files
  mfd: Return twl6030_mmc_card_detect IRQ for board setup
  Revert "mfd: Add platform data for MAX8997 haptic driver"
  mfd: Add support for TPS65090
  mfd: Add some da9052-i2c section annotations
  mfd: Build rtc5t583 only if I2C config is selected to y.
  mfd: Add anatop mfd driver
  mfd: Fix compilation error in tps65910.h
  mfd: Add 8420 variant to db8500-prcmu
  mfd: Add 8520 PRCMU variant to db8500-prcmu
  ...
2012-03-28 13:56:35 -07:00
Linus Torvalds 1bfecd9358 ARM: board specific updates
These changes are all specific to one board only. We're trying to keep
 the number of board files low, but generally board level updates are
 ok on platforms that are working on moving towards DT based probing,
 which will eventually lead to removing them.
 
 The board-ams-delta.c board file gets a conflict between the removal of
 ams_delta_config and the addition of a lot of other data. The Kconfig
 file has two changes in the same line, and in exynos, the power domain
 cleanup conflicts with the addition of the image sensor device.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 [olof: Amended a fix for a mismerge to board-omap4panda.c]
 Signed-off-by: Olof Johansson <olof@lixom.net>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPckIXAAoJEIwa5zzehBx35uUP/jns0renNAMmiu2vBHGQtn4z
 xiNXjDTJ8DeD4mKf17rjn/uaJgQ0w3Doq2nEsi5rPqLK4Uqqk+NG1zYa77QBWHbx
 FUgBPz+oViTDkanp4G8cygXvGfNkb1GvuJxEBvxQ1mwuG4JhwlFbQxGIaS8ZwOAN
 DIyVCgSXy40B+748RwdZ2AY7CYvWiQWrQYsIH6NO0rtZIXjyV0kIsyVtEXZpqWtF
 xNz2HHXVMrui2JQ7FQ0zZglY8+YCxjeJk4v++FfqCJiMzU1yZJw7E30NjhcWAaR6
 odJM2YIyhvunxPfx3ZUHimsNjfU+l/0uXgDHeLFSWVyIjPFXwqZDi/6onP3FI4Jc
 sIoTSwDAQpnZJ6KffAYkcyyfsWN61GOE96Xa2eRb6+78CEiMh7vJ8TIRieiOWxjm
 NbB0xzaKxa97F/8z7w6V6Z4dNhnokWJZvtJdgLZUYAqIgnxstFkJZ9+Tqt77G4t3
 5iSbIMeFPsfh5sUeAVjr5+zVeUOm9PTRI0n0RY+Wd16Ke6DO1qobKAYOzrzI5idz
 k7ni76/zgGn3NS5F3TxdRHowkeGUwUU6poyopgQ0pyscDylVpzgMIqmAwLdzrVp5
 joVEoKi6h4oqhAZtiysXuF85bUfCW0ziDUuib07SX8wcEIAIr+mWob1Ei+wJrefe
 g0Ch3ZbCRQMOwSOQ70Ci
 =HPiJ
 -----END PGP SIGNATURE-----

Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson:
 "These changes are all specific to one board only.  We're trying to
  keep the number of board files low, but generally board level updates
  are ok on platforms that are working on moving towards DT based
  probing, which will eventually lead to removing them.

  The board-ams-delta.c board file gets a conflict between the removal
  of ams_delta_config and the addition of a lot of other data.  The
  Kconfig file has two changes in the same line, and in exynos, the
  power domain cleanup conflicts with the addition of the image sensor
  device.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  [olof: Amended a fix for a mismerge to board-omap4panda.c]
  Signed-off-by: Olof Johansson <olof@lixom.net>"

Fixed up some fairly trivial conflicts manually.

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits)
  i.MX35-PDK: Add Camera support
  ARM : mx35: 3ds-board: add framebuffer device
  pxa/hx4700: Remove pcmcia platform_device structure
  ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35%
  ARM: pxa/hx4700: Remove unwanted request for GPIO105
  ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
  ARM: EXYNOS: Register JPEG on nuri
  ARM: EXYNOS: Register JPEG on universal_c210
  ARM: S5PV210: Enable JPEG on SMDKV210
  ARM: S5PV210: Add JPEG board definition
  ARM: EXYNOS: Enable JPEG on Origen
  ARM: EXYNOS: Enable JPEG on SMDKV310
  ARM: EXYNOS: Add __init attribute to universal_camera_init()
  ARM: EXYNOS: Add __init attribute to nuri_camera_init()
  ARM: S5PV210: Enable FIMC on SMDKC110
  ARM: S5PV210: Enable FIMC on SMDKV210
  ARM: S5PV210: Enable MFC on SMDKC110
  ARM: S5PV210: Enable MFC on SMDKV210
  ARM: EXYNOS: Enable G2D on SMDKV310
  ARM: tegra: update defconfig
  ...
2012-03-27 16:27:28 -07:00
Linus Torvalds d61b7a572b ARM: global cleanups
Quite a bit of code gets removed, and some stuff moved around, mostly
 the old samsung s3c24xx stuff. There should be no functional changes
 in this series otherwise. Some cleanups have dependencies on other
 arm-soc branches and will be sent in the second round.
 
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT2pCjGCrR//JCVInAQLd8RAAqCxhzSc4ewTUP/974gVhujj3TrpiEQcS
 FKvYWF76yP38Lbf3CJZBZaONRtrQNOhYpVQ0jb3WCV4F8mEH9PCes2q9RObeBYiY
 TNX8VdcuVjX2U9HaH0+RQtBUdujNLHpEOqtO57un7T5UDNssR5JOive1tNAooRv1
 pL0Hgx3AVqUbNOPpqQqHzy/MDdd67S6dX80yysANjFGMX87Nvp/ztYAdNnIdta+Z
 pDJt+DPlmK8LvjoSL3SEUN0p3Thk75621cCuauGq88PLIB2w62tzF0NFFbvIAgJT
 3aMlHM2flOiTJAWkUvA8zJiUzwv/0vYvH3xPoTo84abve3lVfZcY+fHNcfxE/Gge
 ri2MmkHyimVP3rNeyM0GbN1RTej1TN1MezeQW3nq2wP6nvS2k0/t32ObLLtWU7XA
 6iA0hKVMSnhqj4ln6jPAmyaDkaWHyYz97urhgetHqGadvLTiGPXCSBPalSiFmyMo
 11tvuqwUNz9tw4nsvGboFQwS2ZoVquC5inoHp5seqZETkGCB67JyeRGxtAM4gbP/
 wIRa3OBLY99yo1on6QovWNnSOMC6X4cOvBI/qHIjSEY/T9JVkslY87gRg3LkxCBR
 XpXfZ6iuLHoSRUGcIjE8D6KHjMgWIDPRnLkIliK4H+3Jn08g0R1MxCplevFCRtis
 egswZ8C24Xw=
 =o5Xl
 -----END PGP SIGNATURE-----

Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull "ARM: global cleanups" from Arnd Bergmann:
 "Quite a bit of code gets removed, and some stuff moved around, mostly
  the old samsung s3c24xx stuff.  There should be no functional changes
  in this series otherwise.  Some cleanups have dependencies on other
  arm-soc branches and will be sent in the second round.

  Signed-off-by: Arnd Bergmann <arnd@arndb.de>"

Fixed up trivial conflicts mainly due to #include's being changes on
both sides.

* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (121 commits)
  ep93xx: Remove unnecessary includes of ep93xx-regs.h
  ep93xx: Move EP93XX_SYSCON defines to SoC private header
  ep93xx: Move crunch code to mach-ep93xx directory
  ep93xx: Make syscon access functions private to SoC
  ep93xx: Configure GPIO ports in core code
  ep93xx: Move peripheral defines to local SoC header
  ep93xx: Convert the watchdog driver into a platform device.
  ep93xx: Use ioremap for backlight driver
  ep93xx: Move GPIO defines to gpio-ep93xx.h
  ep93xx: Don't use system controller defines in audio drivers
  ep93xx: Move PHYS_BASE defines to local SoC header file
  ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver
  ARM: EXYNOS: add clock registers for exynos4x12-cpufreq
  PM / devfreq: update the name of EXYNOS clock registers that were omitted
  PM / devfreq: update the name of EXYNOS clock register
  ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock
  ARM: EXYNOS: use static declaration on regarding clock
  ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs
  ARM: OMAP2+: Fix build error after merge
  ARM: S3C24XX: remove call to s3c24xx_setup_clocks
  ...
2012-03-27 16:03:32 -07:00
Bryan Wu a403d930c5 led-class: change back LEDS_CLASS to tristate instead of bool
After moving some core functions to led-core.c, led-class.c can be built
as module again.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Axel Lin cea694ca3d drivers/leds/leds-lm3530.c: move the code setting gen_config to one place
Improve the readability by moving the code setting gen_config to one
place.

[akpm@linux-foundation.org: fix some patch skew]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Cc: "Milo(Woogyom) Kim" <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Axel Lin 1a1278da5c drivers/leds/leds-pca9633.c: remove unused 'adapter' variable
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Peter Meerwald <p.meerwald@bct-electronic.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo 99ad98d259 leds-lm3530: replace pltfm with pdata
Use 'pdata' rather than 'pltfm' in lm3530_init_registers().

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo 8544d0e3f6 leds-lm3530: remove LM3530_ALS_ZONE_REG code
LM3530_ALS_ZONE_REG is read-only register.
Writing this register is not necessary.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo bb982009d3 leds-lm3530: support pwm input mode
* add 'struct lm3530_pwm_data' in the platform data
  The pwm data is the platform specific functions which generate the pwm.
  The pwm data is only valid when brightness is pwm input mode.
  Functions should be implemented by the pwm driver.
  pwm_set_intensity() : set duty of pwm.
  pwm_get_intensity() : get current the brightness.

* brightness control by pwm
  If the control mode is pwm, then brightness is changed by the duty of
  pwm=.  So pwm platform function should be called in lm3530_brightness_set().

* do not update brightness register when pwm input mode
  In pwm input mode, brightness register is not used.
  If any value is updated in this register, then the led will be off.

* when input mode is changed, set duty of pwm to 0 if unnecessary.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo e13d978659 leds-lm3530: replace i2c_client with led_classdev
To get members of lm3530_data, use 'struct led_classdev' rather than
'struct i2c_client'.

[akpm@linux-foundation.org: fix 80-column fixes more nicely]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo bbe6453204 leds-lm3530: set the max_brightness to 127
Only 7 bits are used for updating the brightness.  (register address :
A0h) So the max_brightness property of lm3530 should be set to 127.

On initializing registers, maximum initial brightness is limited to
'max_brightness'.

Division-by-two is removed on updating the brightness.  This arithmetic is
not necessary because the range of brightness is 0 ~ 127= .

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Mark Brown 16db7f9095 drivers/leds/leds-gpio.c: use linux/gpio.h rather than asm/gpio.h
Direct usage of the asm include has long been deprecated by the
introduction of gpiolib.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Peter Meerwald 75cb2e1d1a drivers/leds: add driver for PCA9633 I2C chip
Driver for the PCA9633 I2C chip supporting four LEDs and 255 brightness
levels.

[akpm@linux-foundation.org: fix kcalloc() call]
[axel.lin@gmail.com: fix kcalloc parameters swapped]
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Andrew Morton d06cb46c3e drivers/leds/leds-lp5523.c: constify some data
Saves ~50 bytes text and speeds things up.

Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Srinidhi KASAGAR 42960b76d2 drivers/leds/leds-lp5521.c: ret may be uninitialized
Fix it by assigning the lp5521_read return value.

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Cc: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:35 -07:00
Kim, Milo 32a2f747dd drivers/leds/leds-lp5521.c: redefinition of register bits
For better readability, values of LP5521_REG_ENABLE register were
redefined= .  Additional definitions: LP5521_ENABLE_DEFAULT and
LP5521_ENABLE_RUN_PROGRAM= .

Use definition rather than hard code value.
: 0x3F -> 'LP5521_CMD_DIRECT'

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:34 -07:00
Kim, Milo 011af7bc7c drivers/leds/leds-lp5521.c: support led pattern data
The lp5521 has autonomous operation mode without external control.
Using lp5521_platform_data, various led patterns can be configurable.
For supporting this feature, new functions and device attribute are
added.

Structure of lp5521_led_pattern: 3 channels are supported - red, green
and blue.  Pattern(s) of each channel and numbers of pattern(s) are
defined in the pla= tform data.  Pattern data are hexa codes which
include pattern commands such like set pwm, wait, ramp up/down, branch
and so on.

Pattern mode functions:
 * lp5521_clear_program_memory
	Before running new led pattern, program memory should be cleared.
 * lp5521_write_program_memory
	Pattern data updated in the program memory via the i2c.
 * lp5521_get_pattern
	Get pattern from predefined in the platform data.
 * lp5521_run_led_pattern
	Stop current pattern or run new pattern.
	Transition time is required between different operation mode.

Device attribute - 'led_pattern': To load specific led pattern, new device
attribute is added.

When the lp5521 driver is unloaded, stop current led pattern mode.

Documentation updated : description about how to define the led patterns
and example.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:34 -07:00
Kim, Milo 3b49aacd0e drivers/leds/leds-lp5521.c: add 'update_config' in the lp5521_platform_data
The value of CONFIG register(Addr 08h) is configurable.  For supporting
this feature, update_config is added in the platform data.  If
'update_config' is not defined, the default value is 'LP5521_PWRSAVE_EN |
LP5521_CP_MODE_AUTO | LP5521_R_TO_BATT'.

To define CONFIG register in the platform data, the bit definitions were
mo= ved to the header file.

Documentation updated : description about 'update_config' and example.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:34 -07:00
Kim, Milo 5ae4e8a77d drivers/leds/leds-lp5521.c: add 'name' in the lp5521_led_config
The name of each led channel can be configurable.  For the compatibility,
the name is set to default value(xx:channelN) when 'name' is not defined.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Arun MURTHY <arun.murthy@stericsson.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:34 -07:00