mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled
authorWenchao Chen <wenchao.chen@unisoc.com>
Wed, 15 Nov 2023 08:34:06 +0000 (16:34 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 23 Nov 2023 17:04:17 +0000 (18:04 +0100)
commit477865af60b2117ceaa1d558e03559108c15c78c
tree531a2296c234faac9fee71d1e1fbd444ca4a2b0c
parentd9ed644f58670865cf067351deb71010bd87a52f
mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled

With cat regulator_summary, we found that vqmmc was not shutting
down after the card was pulled.

cat /sys/kernel/debug/regulator/regulator_summary
1.before fix
1)Insert SD card
 vddsdio 1    1  0 unknown  3500mV 0mA  1200mV  3750mV
    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV

2)Pull out the SD card
 vddsdio                1    1  0 unknown  3500mV 0mA  1200mV  3750mV
    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV

2.after fix
1)Insert SD cardt
 vddsdio                1    1  0 unknown  3500mV 0mA  1200mV  3750mV
    71100000.mmc-vqmmc  1                         0mA  3500mV  3600mV

2)Pull out the SD card
 vddsdio 0    1  0 unknown  3500mV 0mA  1200mV  3750mV
    71100000.mmc-vqmmc  0                         0mA  3500mV  3600mV

Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231115083406.7368-1-wenchao.chen@unisoc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-sprd.c