aboutsummaryrefslogtreecommitdiff
path: root/include/led.h
diff options
context:
space:
mode:
authorPatrick Delaunay2018-07-27 16:37:07 +0200
committerTom Rini2018-08-10 10:27:32 -0400
commitd7a435a2ce3591b7d0b408d8710586415d797e58 (patch)
treee01b3d1bfdb753cd47cafbb08b4eb5ac682fb490 /include/led.h
parent1f6d81fe3398309cacd79f0fdc809502552d3e0c (diff)
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>
Diffstat (limited to 'include/led.h')
-rw-r--r--include/led.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/led.h b/include/led.h
index 940b97f58c0..7bfdddfd6fa 100644
--- a/include/led.h
+++ b/include/led.h
@@ -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