Commit a543f702 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Ulf Hansson

mmc: meson-gx: support platform interrupt as card detect interrupt

Use a new mmc core feature and support specifying the card detect
gpio interrupt in device tree.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/2bb70611-5dea-1144-51bd-93c46b455392@gmail.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 09b31a61
......@@ -1166,7 +1166,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
struct resource *res;
struct meson_host *host;
struct mmc_host *mmc;
int ret;
int cd_irq, ret;
mmc = devm_mmc_alloc_host(&pdev->dev, sizeof(struct meson_host));
if (!mmc)
......@@ -1213,6 +1213,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
if (host->irq <= 0)
return -EINVAL;
cd_irq = platform_get_irq_optional(pdev, 1);
mmc_gpio_set_cd_irq(mmc, cd_irq);
host->pinctrl = devm_pinctrl_get(&pdev->dev);
if (IS_ERR(host->pinctrl))
return PTR_ERR(host->pinctrl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment