]> www.infradead.org Git - users/dwmw2/linux.git/commit
mmc: mmci: Switch to mmc_regulator_set_vqmmc()
authorMarek Vasut <marex@denx.de>
Thu, 16 Apr 2020 16:36:49 +0000 (18:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:32:50 +0000 (09:32 +0200)
commit2e4cc2ec991f2ab518e21adbc98d9fdaeff02953
tree287d247e388b678661c22e382f4be228ea2e48e9
parentbbbe83b3c57e6d90fc41ee0e93d820b72cf4bdde
mmc: mmci: Switch to mmc_regulator_set_vqmmc()

[ Upstream commit 3e09a81e166c0a5544832459be17561a6b231ac7 ]

Instead of reimplementing the logic in mmc_regulator_set_vqmmc(), use the
mmc code function directly.

This also allows us to fix a related issue on STM32MP1, when a voltage
switch of 1.8V is done for the eMMC, but the current level is already set
to 1.8V. More precisely, in this scenario the call to the
->post_sig_volt_switch() hangs, indefinitely waiting for the voltage switch
to complete. Fix this problem by checking if mmc_regulator_set_vqmmc()
returned 1 and then skip invoking the callback.

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20200416163649.336967-3-marex@denx.de
[Ulf: Updated the commit message]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/mmci.c