* [PATCH] mmc: core: Fix debounce time to use microseconds
@ 2018-09-18 23:16 Tony Lindgren
2018-09-26 23:47 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2018-09-18 23:16 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Shawn Lin, linux-omap, linux-mmc, linux-arm-kernel
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 <shawn.lin@rock-chips.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/mmc/core/host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: core: Fix debounce time to use microseconds
2018-09-18 23:16 [PATCH] mmc: core: Fix debounce time to use microseconds Tony Lindgren
@ 2018-09-26 23:47 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2018-09-26 23:47 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Shawn Lin, linux-omap, linux-mmc@vger.kernel.org, Linux ARM
On 19 September 2018 at 01:16, Tony Lindgren <tony@atomide.com> wrote:
> 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 <shawn.lin@rock-chips.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Applied for fixes, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/core/host.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-26 23:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 23:16 [PATCH] mmc: core: Fix debounce time to use microseconds Tony Lindgren
2018-09-26 23:47 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).