On Thu, May 4, 2017 at 12:11 PM, Jagan Teki <ja...@openedev.com> wrote:
> From: Jagan Teki <ja...@amarulasolutions.com>
>
> For OF_CONTROL, gpio's need to configure through
> dm_gpio_* calls instead of non-dm gpio code, So
> add dm_gpio_* calls for dts supported code.
>
> Cc: Stefano Babic <sba...@denx.de>
> Cc: Fabio Estevam <fabio.este...@nxp.com>
> Cc: Michael Trimarchi <mich...@amarulasolutions.com>
> Signed-off-by: Jagan Teki <ja...@amarulasolutions.com>
> ---
>  board/freescale/mx6sabresd/mx6sabresd.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
> b/board/freescale/mx6sabresd/mx6sabresd.c
> index 3f73b9b..1df81b9 100644
> --- a/board/freescale/mx6sabresd/mx6sabresd.c
> +++ b/board/freescale/mx6sabresd/mx6sabresd.c
> @@ -190,7 +190,29 @@ static iomux_v3_cfg_t const bl_pads[] = {
>  static void enable_backlight(void)
>  {
>         imx_iomux_v3_setup_multiple_pads(bl_pads, ARRAY_SIZE(bl_pads));
> +
> +#ifdef CONFIG_OF_CONTROL
> +       struct gpio_desc backlight;
> +       int ret;
> +
> +       /* Set Brightness to high */
> +       ret = dm_gpio_lookup_name("GPIO1_21", &backlight);

Can't we avoid such hardcoded GPIO and use dts to retrieve it?
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to