[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZZvvd+yTuvfrBuCzXj==Eni4oiC0zj2LP1Mh4wUgdn5Q@mail.gmail.com>
Date: Mon, 11 Feb 2019 09:27:47 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Jonathan Neuschäfer <j.neuschaefer@....net>
Cc: linux-mmc <linux-mmc@...r.kernel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: spi: Fix card detection during probe
On Sun, Feb 10, 2019 at 6:31 PM Jonathan Neuschäfer
<j.neuschaefer@....net> wrote:
> 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_spi_probe
> mmc_add_host
> mmc_start_host
> _mmc_detect_change
> mmc_schedule_delayed_work(&host->detect, 0)
> mmc_rescan
> host->bus_ops->detect(host)
> mmc_detect
> _mmc_detect_card_removed
> host->ops->get_cd(host)
> mmc_gpio_get_cd -> -ENOSYS (ctx->cd_gpio not set)
> mmc_gpiod_request_cd
> 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@....net>
Seems correct!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists