[PATCH 2/2] mmc: meson-gx: support platform interrupt as card detect interrupt

Ulf Hansson ulf.hansson at linaro.org
Mon Feb 13 14:47:14 PST 2023


On Mon, 30 Jan 2023 at 00:10, Heiner Kallweit <hkallweit1 at gmail.com> wrote:
>
> Use a new mmc core feature and support specifying the card detect
> gpio interrupt in device tree.

Don't we need an update to the DT doc too?

Kind regards
Uffe

>
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
> ---
>  drivers/mmc/host/meson-gx-mmc.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index be1a972c2..c87bc31d0 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -1236,6 +1236,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
>                 goto free_host;
>         }
>
> +       /* gpio card detect interrupt */
> +       mmc->cd_irq = platform_get_irq_optional(pdev, 1);
> +
>         host->pinctrl = devm_pinctrl_get(&pdev->dev);
>         if (IS_ERR(host->pinctrl)) {
>                 ret = PTR_ERR(host->pinctrl);
> --
> 2.39.1
>
>



More information about the linux-amlogic mailing list