From 17585e2dc33c23b3ea37daf485ced880c8fea3f8 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 27 Jul 2018 16:37:09 +0200 Subject: 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 Signed-off-by: Patrick Delaunay --- board/sandbox/sandbox.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'board/sandbox/sandbox.c') diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 195f620834b..0e87674826a 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -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) { -- cgit v1.2.3