
From: Patrick Delaunay [mailto:patrick.delaunay@st.com] Sent: Dienstag, 24. Juli 2018 10:59 Subject: [PATCH v3 5/5] 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
Led default-state is correctly handle in Sandbox, tested with: ./u-boot -d ./arch/sandbox/dts/test.dtb => led list sandbox:red <inactive> sandbox:green <inactive> sandbox:default_on on sandbox:default_off off
This patch solve "make tests" issue introduced by http://patchwork.ozlabs.org/patch/943651/
Changes in v3: None Changes in v2:
- add sandbox impact and test update
board/sandbox/sandbox.c | 9 +++++++++ common/board_r.c | 3 ++- test/dm/led.c | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 195f620..66b5f24 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) +{ +#ifdef CONFIG_LED
led_default_state();
+#endif /* CONFIG_LED */
I think you forgot to apply Simons suggestion here, like you did for 4/5
return 0;
+} ...
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075