• L
    leds: handle suspend/resume in heartbeat trigger · 5ab92a7c
    Linus Walleij 提交于
    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: NLinus Walleij <linus.walleij@linaro.org>
    Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
    5ab92a7c
ledtrig-heartbeat.c 6.0 KB