]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: sdhci-esdhc-imx: fix esdhc_change_pinstate() to allow default state restore
authorLuke Wang <ziniu.wang_1@nxp.com>
Wed, 15 Jul 2026 07:18:13 +0000 (15:18 +0800)
committerUlf Hansson <ulfh@kernel.org>
Wed, 15 Jul 2026 08:59:30 +0000 (10:59 +0200)
commit5adc14cd4b905629d5b9163b3a416dcab24c7ce2
tree3a57255a9ba91aa8b5dc6a14e38a6b7dac428de9
parent2439becd91bad6883b135044f85f83a0538b96a6
mmc: sdhci-esdhc-imx: fix esdhc_change_pinstate() to allow default state restore

esdhc_change_pinstate() checks for pins_100mhz and pins_200mhz at the
top of the function and returns -EINVAL if either is not defined. This
prevents the default case from ever being reached, which means devices
with a sleep pinctrl state but without high-speed pin states (100mhz/
200mhz) can never restore their default pin configuration.

Move the IS_ERR checks for pins_100mhz and pins_200mhz into their
respective switch cases.

Fixes: 676a83855614 ("mmc: host: sdhci-esdhc-imx: refactor the system PM logic")
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/mmc/host/sdhci-esdhc-imx.c