diff mbox series

[U-Boot,v2,06/11] imx: tpc70: led: Enable LED default state

Message ID 20190730071213.11238-7-lukma@denx.de
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series dm: Convert TPC70 to use DM and DTS in SPL and u-boot proper | expand

Commit Message

Lukasz Majewski July 30, 2019, 7:12 a.m. UTC
This change sets the default state of LEDs on TPC70.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peng Fan Aug. 9, 2019, 7:08 a.m. UTC | #1
> Subject: [PATCH v2 06/11] imx: tpc70: led: Enable LED default state
> 
> This change sets the default state of LEDs on TPC70.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
> 
>  board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
> b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
> index 1dbd03efd8..97af6bd65b 100644
> --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
> +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
> @@ -27,6 +27,7 @@
>  #include <netdev.h>
>  #include <usb.h>
>  #include <usb/ehci-ci.h>
> +#include <led.h>
> 
>  DECLARE_GLOBAL_DATA_PTR;
> 
> @@ -290,6 +291,9 @@ int board_late_init(void)
>  	add_board_boot_modes(board_boot_modes);
>  #endif
> 
> +	if (IS_ENABLED(CONFIG_LED))
> +		led_default_state();
> +
>  	env_set("boardname", "kp-tpc");
>  	env_set("boardsoc", "imx6q");
>  	return 0;

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.11.0
diff mbox series

Patch

diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
index 1dbd03efd8..97af6bd65b 100644
--- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
+++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c
@@ -27,6 +27,7 @@ 
 #include <netdev.h>
 #include <usb.h>
 #include <usb/ehci-ci.h>
+#include <led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -290,6 +291,9 @@  int board_late_init(void)
 	add_board_boot_modes(board_boot_modes);
 #endif
 
+	if (IS_ENABLED(CONFIG_LED))
+		led_default_state();
+
 	env_set("boardname", "kp-tpc");
 	env_set("boardsoc", "imx6q");
 	return 0;