diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-26 00:00:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-26 00:00:29 -0400 |
commit | 56a9ccb7ba5ffd5f285e3a9628cb446192c8639c (patch) | |
tree | a9d54537cea4761073374ef5fbc9097cbfe52440 /drivers/leds | |
parent | 44bbd7ac2658eb1118342493026ef141e259b739 (diff) | |
parent | 909a78b320b31ca9709d7ea5f602ec1bd2015192 (diff) |
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: (30 commits)
bq20z75: Fix time and temp units
bq20z75: Fix issues with present and suspend
z2_battery: Fix count of properties
s3c_adc_battery: Fix method names when PM not set
z2_battery: Add MODULE_DEVICE_TABLE
ds2782_battery: Add MODULE_DEVICE_TABLE
bq20z75: Add MODULE_DEVICE_TABLE
power_supply: Update power_supply_is_watt_property
bq20z75: Add i2c retry mechanism
bq20z75: Add optional battery detect gpio
twl4030_charger: Make the driver atomic notifier safe
bq27x00: Use single i2c_transfer call for property read
bq27x00: Cleanup bq27x00_i2c_read
bq27x00: Minor cleanups
bq27x00: Give more specific reports on battery status
bq27x00: Add MODULE_DEVICE_TABLE
bq27x00: Add new properties
bq27x00: Poll battery state
bq27x00: Cache battery registers
bq27x00: Add bq27000 support
...
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-triggers.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index c41eb6180c9c..4bebae733349 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c | |||
@@ -231,6 +231,26 @@ void led_trigger_event(struct led_trigger *trigger, | |||
231 | } | 231 | } |
232 | EXPORT_SYMBOL_GPL(led_trigger_event); | 232 | EXPORT_SYMBOL_GPL(led_trigger_event); |
233 | 233 | ||
234 | void led_trigger_blink(struct led_trigger *trigger, | ||
235 | unsigned long *delay_on, | ||
236 | unsigned long *delay_off) | ||
237 | { | ||
238 | struct list_head *entry; | ||
239 | |||
240 | if (!trigger) | ||
241 | return; | ||
242 | |||
243 | read_lock(&trigger->leddev_list_lock); | ||
244 | list_for_each(entry, &trigger->led_cdevs) { | ||
245 | struct led_classdev *led_cdev; | ||
246 | |||
247 | led_cdev = list_entry(entry, struct led_classdev, trig_list); | ||
248 | led_blink_set(led_cdev, delay_on, delay_off); | ||
249 | } | ||
250 | read_unlock(&trigger->leddev_list_lock); | ||
251 | } | ||
252 | EXPORT_SYMBOL_GPL(led_trigger_blink); | ||
253 | |||
234 | void led_trigger_register_simple(const char *name, struct led_trigger **tp) | 254 | void led_trigger_register_simple(const char *name, struct led_trigger **tp) |
235 | { | 255 | { |
236 | struct led_trigger *trigger; | 256 | struct led_trigger *trigger; |