led: Configure LED default-state on boot

In case the DT LED subnode contains "default-state" property set to
either "on" or "off", probe the LED driver and configure the LED state
automatically.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Philippe Reynes <philippe.reynes@softathome.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Steven Lawrance <steven.lawrance@softathome.com>
[trini: Update the relevant test now that we have support]
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/include/led.h b/include/led.h
index 8eeb5a7..43acca8 100644
--- a/include/led.h
+++ b/include/led.h
@@ -9,24 +9,6 @@
 
 struct udevice;
 
-/**
- * struct led_uc_plat - Platform data the uclass stores about each device
- *
- * @label:	LED label
- */
-struct led_uc_plat {
-	const char *label;
-};
-
-/**
- * struct led_uc_priv - Private data the uclass stores about each device
- *
- * @period_ms:	Flash period in milliseconds
- */
-struct led_uc_priv {
-	int period_ms;
-};
-
 enum led_state_t {
 	LEDST_OFF = 0,
 	LEDST_ON = 1,
@@ -38,6 +20,26 @@
 	LEDST_COUNT,
 };
 
+/**
+ * struct led_uc_plat - Platform data the uclass stores about each device
+ *
+ * @label:	LED label
+ * @default_state:	LED default state
+ */
+struct led_uc_plat {
+	const char *label;
+	enum led_state_t default_state;
+};
+
+/**
+ * struct led_uc_priv - Private data the uclass stores about each device
+ *
+ * @period_ms:	Flash period in milliseconds
+ */
+struct led_uc_priv {
+	int period_ms;
+};
+
 struct led_ops {
 	/**
 	 * set_state() - set the state of an LED