spi: cadence: fix unclocked access on unbind
authorJohan Hovold <johan@kernel.org>
Tue, 21 Apr 2026 12:36:12 +0000 (14:36 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:25:48 +0000 (08:25 +0900)
commit5b1689a41f02955c5361944f748a4812a6ff9307
tree11832cff0cdd39fff86aa83c899099c832e9b35f
parent254f49634ee16a731174d2ae34bc50bd5f45e731
spi: cadence: fix unclocked access on unbind

Make sure that the controller is runtime resumed before disabling it
during driver unbind to avoid unclocked register access and unbalanced
clock disable.

Also restore the autosuspend setting.

This issue was flagged by Sashiko when reviewing a controller
deregistration fix.

Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Cc: stable@vger.kernel.org # 4.7
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=1
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260421123615.1533617-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence.c