mmc: core: Fix debounce time to use microseconds
authorTony Lindgren <[email protected]>
Tue, 18 Sep 2018 23:16:56 +0000 (16:16 -0700)
committerUlf Hansson <[email protected]>
Wed, 26 Sep 2018 22:39:32 +0000 (00:39 +0200)
The debounce value in device tree is in milliseconds but needs to be in
microseconds for mmc_gpiod_request_cd().

Fixes: bfd694d5e21c ("mmc: core: Add tunable delay before detecting card
after card is inserted")
Cc: Shawn Lin <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Cc: [email protected] # v4.18+
Signed-off-by: Ulf Hansson <[email protected]>
drivers/mmc/core/host.c

index abf9e884386c4cc42edee4113bb1a989167dba55..f57f5de5420647619714c65861896252700d302c 100644 (file)
@@ -235,7 +235,7 @@ int mmc_of_parse(struct mmc_host *host)
                        host->caps |= MMC_CAP_NEEDS_POLL;
 
                ret = mmc_gpiod_request_cd(host, "cd", 0, true,
-                                          cd_debounce_delay_ms,
+                                          cd_debounce_delay_ms * 1000,
                                           &cd_gpio_invert);
                if (!ret)
                        dev_info(host->parent, "Got CD GPIO\n");