]> www.infradead.org Git - users/dwmw2/linux.git/commit
wifi: wilc1000: make sdio deinit function really deinit the sdio card
authorAlexis Lothoré <alexis.lothore@bootlin.com>
Tue, 14 May 2024 15:51:23 +0000 (17:51 +0200)
committerKalle Valo <kvalo@kernel.org>
Fri, 17 May 2024 08:01:52 +0000 (11:01 +0300)
commita5d6b1d453a149e70452d5e69320db04afb520e2
tree51c7b226d45954c2599eab386bd7636eeff90f38
parent59cf9277c1fe6f8a72af83bf4a1d9b3f22124750
wifi: wilc1000: make sdio deinit function really deinit the sdio card

In order to be able to read raw registers (eg the nv mac address) in
wilc1000 during probe before the firmware is loaded and running, we need to
run the basic sdio functions initialization, but then we also need to
properly deinitialize those right after, to preserve the current driver
behavior (keeping the chip idle/unconfigured until the corresponding
interface is brought up). Calling wilc_sdio_deinit in its current form is
not enough because it merely resets an internal flag.

Implement a deinit sequence which symmetrically reset all steps performed
in wilc_sdio_init (only for parts activating/deactivating features, for the
sake of simplicity, let's ignore blocks size configuration reset)

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240514-mac_addr_at_probe-v2-5-afef09f1cd10@bootlin.com
drivers/net/wireless/microchip/wilc1000/sdio.c