Re: [PATCH] mmc: spi: Fix card detection during probe
From: Linus Walleij
Date: Mon Feb 11 2019 - 03:28:03 EST
On Sun, Feb 10, 2019 at 6:31 PM Jonathan NeuschÃfer
> When using the mmc_spi driver with a card-detect pin, I noticed that the
> card was not detected immediately after probe, but only after it was
> unplugged and plugged back in (and the CD IRQ fired).
> The call tree looks something like this:
> mmc_schedule_delayed_work(&host->detect, 0)
> mmc_gpio_get_cd -> -ENOSYS (ctx->cd_gpio not set)
> ctx->cd_gpio = desc
> To fix this issue, call mmc_detect_change after the card-detect GPIO/IRQ
> is registered.
> Signed-off-by: Jonathan NeuschÃfer <j.neuschaefer@xxxxxxx>
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>