Skip to contentSkip to conversation

mmc: core: Fix debounce time to use microseconds

PATCH New Tony Lindgren 2 participants 2 messages Sep 18, 2018 – Sep 26, 2018 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: core: Fix debounce time to use microseconds

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")

---
 drivers/mmc/core/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/host.c +1 -1
@@ -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");
Signature · 1 line
2.19.0
#1 lore raw

PATCH 1/1 mmc: core: Fix debounce time to use microseconds

Quoted 7 lines · Tony Lindgren

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")

Applied for fixes, thanks!

Kind regards
Uffe

Quoted 18 lines
---
 drivers/mmc/core/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/host.c +1 -2
@@ -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");
--

2.19.0