1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: led: move default state support in led uclass

This patch save common LED property "default-state" value
in post bind of LED uclass.
The configuration for this default state is only performed when
led_default_state() is called;
It can be called in your board_init()
or it could added in init_sequence_r[] in future.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
Patrick Delaunay
2018-07-27 16:37:07 +02:00
committed by Tom Rini
parent 1f6d81fe33
commit d7a435a2ce
3 changed files with 39 additions and 8 deletions

View File

@@ -106,4 +106,13 @@ enum led_state_t led_get_state(struct udevice *dev);
*/
int led_set_period(struct udevice *dev, int period_ms);
/**
* led_default_state() - set the default state for all the LED
*
* This enables all leds which have default state.
* see Documentation/devicetree/bindings/leds/common.txt
*
*/
int led_default_state(void);
#endif