1 From 1d71926bbd59facc4bdb6f13117d3a1aee8b83ba Mon Sep 17 00:00:00 2001
2 From: Tony Lindgren <tony@atomide.com>
3 Date: Tue, 18 Sep 2018 16:16:56 -0700
4 Subject: mmc: core: Fix debounce time to use microseconds
6 From: Tony Lindgren <tony@atomide.com>
8 commit 1d71926bbd59facc4bdb6f13117d3a1aee8b83ba upstream.
10 The debounce value in device tree is in milliseconds but needs to be in
11 microseconds for mmc_gpiod_request_cd().
13 Fixes: bfd694d5e21c ("mmc: core: Add tunable delay before detecting card
14 after card is inserted")
15 Cc: Shawn Lin <shawn.lin@rock-chips.com>
16 Signed-off-by: Tony Lindgren <tony@atomide.com>
17 Cc: stable@vger.kernel.org # v4.18+
18 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 drivers/mmc/core/host.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
25 --- a/drivers/mmc/core/host.c
26 +++ b/drivers/mmc/core/host.c
27 @@ -235,7 +235,7 @@ int mmc_of_parse(struct mmc_host *host)
28 host->caps |= MMC_CAP_NEEDS_POLL;
30 ret = mmc_gpiod_request_cd(host, "cd", 0, true,
31 - cd_debounce_delay_ms,
32 + cd_debounce_delay_ms * 1000,
35 dev_info(host->parent, "Got CD GPIO\n");