wilc1000: configure registers to handle chip wakeup sequence
authorAjay Singh <ajay.kathat@microchip.com>
Thu, 16 Sep 2021 16:49:19 +0000 (16:49 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Sep 2021 15:08:15 +0000 (18:08 +0300)
commit5bb9de8bcb18c38ea089a287b77944ef8ee71abd
treef6fb84c6b2c475c928f9d2f2f7102a00cbbeed9c
parent0ec5408cd44855956f7741bd776f44db167801b7
wilc1000: configure registers to handle chip wakeup sequence

Use the correct sequence to configure clockless registers for chip wake-up.
The following sequence is expected from WILC chip for wakeup:
 - set wakeup bit in wakeup_reg register
 - after setting the wakeup bit, read back the clock status bit for wakeup
   complete.

For SDIO/SPI modules, the wakeup sequence is the same except uses different
register values so refactored the code to use common function for both
SDIO/SPI bus.

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-5-ajay.kathat@microchip.com
drivers/net/wireless/microchip/wilc1000/cfg80211.c
drivers/net/wireless/microchip/wilc1000/netdev.h
drivers/net/wireless/microchip/wilc1000/wlan.c
drivers/net/wireless/microchip/wilc1000/wlan.h
drivers/net/wireless/microchip/wilc1000/wlan_if.h