summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip/wilc1000/wlan.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2021-09-16 19:49:20 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-09-21 18:08:16 +0300
commitc2dcb4766bcb1e3622d7579ee9d57f28dc2c2f2e (patch)
tree18ce6daefbc5af56d5cd8b309fbe37cc1429798d /drivers/net/wireless/microchip/wilc1000/wlan.c
parent1bcc0879c963770c90bc07d9aa5d0d50dda925f3 (diff)
downloadlinux-c2dcb4766bcb1e3622d7579ee9d57f28dc2c2f2e.tar.xz
wilc1000: handle read failure issue for clockless registers
For SPI bus, the register read fails after read/write to the clockless register during chip wakeup sequence. Add workaround to send CMD_RESET command during chip wake-up sequence to overcome the issue. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-7-ajay.kathat@microchip.com
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/wlan.c')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/wlan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 1aad537c468f..f9256c1bad45 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -669,6 +669,11 @@ void chip_wakeup(struct wilc *wilc)
pr_err("Failed to wake-up the chip\n");
return;
}
+ /* Sometimes spi fail to read clock regs after reading
+ * writing clockless registers
+ */
+ if (wilc->io_type == WILC_HIF_SPI)
+ wilc->hif_func->hif_reset(wilc);
}
EXPORT_SYMBOL_GPL(chip_wakeup);