OSDN Git Service

leds: leds-core: Implement the retain-state-shutdown property
authorEddie James <eajames@linux.ibm.com>
Fri, 16 Jul 2021 22:03:26 +0000 (17:03 -0500)
committerPavel Machek <pavel@ucw.cz>
Fri, 20 Aug 2021 09:00:06 +0000 (11:00 +0200)
commit419066324e19a47b98cdcf5defda42de555a8957
tree161eeb1283f1c4a6cca6e25cd037088058c2f33d
parent5d823d6d69853ae07786ddf786f7693b57e76beb
leds: leds-core: Implement the retain-state-shutdown property

Read the retain-state-shutdown device tree property to set the
existing LED_RETAIN_AT_SHUTDOWN flag. Then check the flag when
unregistering, and if set, don't set the brightness to OFF. This
is useful for systems that want to keep the HW state of the LED
across reboots.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/led-class.c