Home
last modified time | relevance | path

Searched hist:"9697 e2f0" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/leds/
H A Dleds-cht-wcove.c9697e2f0 Sun Apr 30 14:59:49 CDT 2023 Hans de Goede <hdegoede@redhat.com> leds: cht-wcove: Add suspend/resume handling

When LED1 is showing the tablet is charging and then the device gets
suspended followed by unplugging the charger, then it will incorrectly
still show it is charging.

To avoid this turn both LEDs off on suspend, just like the PMIC always
turns them off when the tablet is powered off (even if the tablet is
charging). If hw-control is supported for LED1, then restore the
initial hw-control settings to let the hw control LED1 while suspended.

To restore the state the LEDs had before suspending, save it before
turning the LEDs off and restore it on resume.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230430195952.862527-3-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>