OpenCloudOS-Kernel/drivers/leds/trigger
Linus Walleij 5ab92a7cb8 leds: handle suspend/resume in heartbeat trigger
The following phenomena was observed: when suspending the
system, sometimes the heartbeat LED was left on, glowing and
wasting power while the rest of the system is asleep, also
disturbing power dissapation measures on the odd suspend
cycle when it's left on.

Clearly this is not how we want the heartbeat trigger to
work: it should turn off and leave the LED off during
system suspend.

This removes the heartbeat trigger when preparing suspend and
restores it during resume. The trigger code will make sure all
LEDs are left in OFF state after removing the trigger, and
will re-enable the trigger on all LEDs after resuming.

Cc: linux-pm@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
2016-06-08 11:47:06 +02:00
..
Kconfig leds: triggers: Allow to switch the trigger to "panic" on a kernel panic 2016-05-06 10:22:09 +02:00
Makefile leds: trigger: Introduce a MTD (NAND/NOR) trigger 2016-04-13 10:23:14 +02:00
ledtrig-backlight.c leds: core: Add led_set_brightness_nosleep{nopm} functions 2016-01-04 09:57:30 +01:00
ledtrig-camera.c leds: add camera LED triggers 2013-04-01 11:04:50 -07:00
ledtrig-cpu.c leds: ledtrig-cpu: Make the driver explicitly non-modular 2016-01-04 09:57:39 +01:00
ledtrig-default-on.c leds: core: Add led_set_brightness_nosleep{nopm} functions 2016-01-04 09:57:30 +01:00
ledtrig-gpio.c leds: core: Add led_set_brightness_nosleep{nopm} functions 2016-01-04 09:57:30 +01:00
ledtrig-heartbeat.c leds: handle suspend/resume in heartbeat trigger 2016-06-08 11:47:06 +02:00
ledtrig-ide-disk.c leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity() 2016-04-19 08:57:16 +02:00
ledtrig-mtd.c leds: trigger: Introduce a MTD (NAND/NOR) trigger 2016-04-13 10:23:14 +02:00
ledtrig-oneshot.c leds: triggers: oneshot: fix module license specification 2016-01-04 09:57:36 +01:00
ledtrig-panic.c leds: triggers: Allow to switch the trigger to "panic" on a kernel panic 2016-05-06 10:22:09 +02:00
ledtrig-timer.c
ledtrig-transient.c leds: ledtrig-transient: fix duration to be msec instead of jiffies 2016-01-04 09:57:36 +01:00