diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 16:56:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 16:56:35 -0400 |
commit | 30304e5a79d424eb2c8707b3ff0e9b8bf6ab3e8f (patch) | |
tree | 63968fb97b86861e31922515395feef8a110f884 /drivers/leds | |
parent | 750f77064a290beb162352077b52c61b04bcae0e (diff) | |
parent | b8589e2a8065b8e7773742b60ae96b63b757bb69 (diff) |
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
...
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-88pm860x.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c index 4ca00624bd18..5b61aaf7ac0f 100644 --- a/drivers/leds/leds-88pm860x.c +++ b/drivers/leds/leds-88pm860x.c | |||
@@ -114,6 +114,27 @@ static inline int __blink_ctl_mask(int port) | |||
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | 116 | ||
117 | static int led_power_set(struct pm860x_chip *chip, int port, int on) | ||
118 | { | ||
119 | int ret = -EINVAL; | ||
120 | |||
121 | switch (port) { | ||
122 | case PM8606_LED1_RED: | ||
123 | case PM8606_LED1_GREEN: | ||
124 | case PM8606_LED1_BLUE: | ||
125 | ret = on ? pm8606_osc_enable(chip, RGB1_ENABLE) : | ||
126 | pm8606_osc_disable(chip, RGB1_ENABLE); | ||
127 | break; | ||
128 | case PM8606_LED2_RED: | ||
129 | case PM8606_LED2_GREEN: | ||
130 | case PM8606_LED2_BLUE: | ||
131 | ret = on ? pm8606_osc_enable(chip, RGB2_ENABLE) : | ||
132 | pm8606_osc_disable(chip, RGB2_ENABLE); | ||
133 | break; | ||
134 | } | ||
135 | return ret; | ||
136 | } | ||
137 | |||
117 | static void pm860x_led_work(struct work_struct *work) | 138 | static void pm860x_led_work(struct work_struct *work) |
118 | { | 139 | { |
119 | 140 | ||
@@ -126,6 +147,7 @@ static void pm860x_led_work(struct work_struct *work) | |||
126 | chip = led->chip; | 147 | chip = led->chip; |
127 | mutex_lock(&led->lock); | 148 | mutex_lock(&led->lock); |
128 | if ((led->current_brightness == 0) && led->brightness) { | 149 | if ((led->current_brightness == 0) && led->brightness) { |
150 | led_power_set(chip, led->port, 1); | ||
129 | if (led->iset) { | 151 | if (led->iset) { |
130 | pm860x_set_bits(led->i2c, __led_off(led->port), | 152 | pm860x_set_bits(led->i2c, __led_off(led->port), |
131 | LED_CURRENT_MASK, led->iset); | 153 | LED_CURRENT_MASK, led->iset); |
@@ -149,6 +171,7 @@ static void pm860x_led_work(struct work_struct *work) | |||
149 | LED_CURRENT_MASK, 0); | 171 | LED_CURRENT_MASK, 0); |
150 | mask = __blink_ctl_mask(led->port); | 172 | mask = __blink_ctl_mask(led->port); |
151 | pm860x_set_bits(led->i2c, PM8606_WLED3B, mask, 0); | 173 | pm860x_set_bits(led->i2c, PM8606_WLED3B, mask, 0); |
174 | led_power_set(chip, led->port, 0); | ||
152 | } | 175 | } |
153 | } | 176 | } |
154 | led->current_brightness = led->brightness; | 177 | led->current_brightness = led->brightness; |