[U-Boot] [PATCH 1/5] drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined

Simon Glass sjg at chromium.org
Wed Apr 20 16:40:01 CEST 2016


Hi Muganthan,

On 4 April 2016 at 05:58, Mugunthan V N <mugunthanvnm at ti.com> wrote:
> Add request gpio for CD and WP gpios, so that the gpio can be
> used for the respective purposes.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
> ---
>  drivers/mmc/omap_hsmmc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index 1071314..85a832b 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -820,6 +820,11 @@ static int omap_hsmmc_probe(struct udevice *dev)
>         if (mmc == NULL)
>                 return -1;
>
> +#ifdef OMAP_HSMMC_USE_GPIO
> +       gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
> +       gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);

Please check errors here.

> +#endif
> +
>         upriv->mmc = mmc;
>
>         return 0;
> --
> 2.8.0.rc3.9.g44915db
>

Regards,
Simon


More information about the U-Boot mailing list