Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 451c8957 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Chris Ball
Browse files

mmc: extend the slot-gpio card-detection to use host's .card_event() method



The slot-gpio API provides a generic card-detection handler. To support a
wider range of hosts it has to call the host's card-event callback, if
implemented. Also increase the debounce interval to 200ms to match the
SDHCI driver.

Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 9f1fb60a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -27,7 +27,13 @@ struct mmc_gpio {
static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id)
{
	/* Schedule a card detection after a debounce timeout */
	mmc_detect_change(dev_id, msecs_to_jiffies(100));
	struct mmc_host *host = dev_id;

	if (host->ops->card_event)
		host->ops->card_event(host);

	mmc_detect_change(host, msecs_to_jiffies(200));

	return IRQ_HANDLED;
}