MLK-15127 mx7dsdb: fix epdc en gpio usage
authorPeng Fan <peng.fan@nxp.com>
Wed, 21 Jun 2017 02:47:16 +0000 (10:47 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:36:55 +0000 (02:36 +0800)
Request gpio before use it, otherwise it will fail to
drive the gpio when gpio_direction_output.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 31da76c496511b3d640ac1008b630b3ec939e168)

board/freescale/mx7dsabresd/mx7dsabresd.c

index e05fdf6..b97de36 100644 (file)
@@ -595,6 +595,7 @@ int board_init(void)
                 */
                imx_iomux_v3_setup_multiple_pads(epdc_en_pads,
                        ARRAY_SIZE(epdc_en_pads));
+               gpio_request(IMX_GPIO_NR(1, 4), "epdc_en");
                gpio_direction_output(IMX_GPIO_NR(1, 4), 1);
        }
        setup_epdc();