diff mbox

[U-Boot,v2,5/8] rockchip: board: evb_rk3399: initialize pwm0 for dispaly backlight

Message ID 1492499382-7078-6-git-send-email-eric.gao@rock-chips.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

eric.gao@rock-chips.com April 18, 2017, 7:09 a.m. UTC
Signed-off-by: Eric Gao <eric.gao@rock-chips.com>

---

Changes in v2:
-Add pwm0 pinctrl init for lcd backlight.

 board/rockchip/evb_rk3399/evb-rk3399.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Eddie Cai April 18, 2017, 2:32 p.m. UTC | #1
2017-04-18 15:09 GMT+08:00 Eric Gao <eric.gao@rock-chips.com>:

> Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
>
> ---
>
> Changes in v2:
> -Add pwm0 pinctrl init for lcd backlight.
>
>  board/rockchip/evb_rk3399/evb-rk3399.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c
> b/board/rockchip/evb_rk3399/evb-rk3399.c
> index 362fa0b..76ab467 100644
> --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> @@ -28,6 +28,13 @@ int board_init(void)
>                 goto out;
>         }
>
> +       /* Enable pwm0 for panel backlight */
> +       ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM0);
> +       if (ret) {
> +               debug("%s PWM0 pinctrl init fail!\n", __func__);
>
can you also print the ret value?

> +               goto out;
> +       }
> +
>         ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);
>         if (ret) {
>                 debug("%s PWM2 pinctrl init fail!\n", __func__);
> --
> 1.9.1
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
diff mbox

Patch

diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index 362fa0b..76ab467 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -28,6 +28,13 @@  int board_init(void)
 		goto out;
 	}
 
+	/* Enable pwm0 for panel backlight */
+	ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM0);
+	if (ret) {
+		debug("%s PWM0 pinctrl init fail!\n", __func__);
+		goto out;
+	}
+
 	ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);
 	if (ret) {
 		debug("%s PWM2 pinctrl init fail!\n", __func__);