Skip to content

Commit

Permalink
mmc: core: Fix debounce time to use microseconds
Browse files Browse the repository at this point in the history
The debounce value in device tree is in milliseconds but needs to be in
microseconds for mmc_gpiod_request_cd().

Fixes: bfd694d ("mmc: core: Add tunable delay before detecting card
after card is inserted")
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Tony Lindgren authored and Ulf Hansson committed Sep 26, 2018
1 parent 2ea1503 commit 1d71926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1d71926

Please sign in to comment.