summaryrefslogtreecommitdiff
path: root/board/sandbox
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-07-27 16:37:09 +0200
committerTom Rini <trini@konsulko.com>2018-08-10 10:27:32 -0400
commit17585e2dc33c23b3ea37daf485ced880c8fea3f8 (patch)
treeae4705a14fb2f48d7d2cc5d4ae05ffd506c3a393 /board/sandbox
parent1f5118b4d38d9caaab4c451f974542297bd1e2a7 (diff)
sandbox: led: use new function to configure default state
Initialize the led with the default state defined in device tree in board_init and solve issue with test for led default state. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'board/sandbox')
-rw-r--r--board/sandbox/sandbox.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 195f620834..0e87674826 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cros_ec.h>
#include <dm.h>
+#include <led.h>
#include <os.h>
#include <asm/test.h>
#include <asm/u-boot-sandbox.h>
@@ -47,6 +48,14 @@ int dram_init(void)
return 0;
}
+int board_init(void)
+{
+ if (IS_ENABLED(CONFIG_LED))
+ led_default_state();
+
+ return 0;
+}
+
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{