提交 1b09d9c2 编写于 作者: M Marek Szyprowski 提交者: Ulf Hansson

mmc: slot-gpio: Fix debounce time to use miliseconds again

The debounce value passed to mmc_gpiod_request_cd() function is in
microseconds, but msecs_to_jiffies() requires the value to be in
miliseconds to properly calculate the delay, so adjust the value stored
in cd_debounce_delay_ms context entry.

Fixes: 1d71926b ("mmc: core: Fix debounce time to use microseconds")
Fixes: bfd694d5 ("mmc: core: Add tunable delay before detecting card
after card is inserted")
Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 1d71926b
......@@ -271,7 +271,7 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
if (debounce) {
ret = gpiod_set_debounce(desc, debounce);
if (ret < 0)
ctx->cd_debounce_delay_ms = debounce;
ctx->cd_debounce_delay_ms = debounce / 1000;
}
if (gpio_invert)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册