]> git.baikalelectronics.ru Git - kernel.git/commit
wilc1000: Add reset/enable GPIO support to SPI driver
authorDavid Mosberger-Tang <davidm@egauge.net>
Tue, 21 Dec 2021 21:25:34 +0000 (21:25 +0000)
committerKalle Valo <kvalo@kernel.org>
Wed, 22 Dec 2021 17:51:18 +0000 (19:51 +0200)
commit7972c4e49c5ca8cf53df6e34cc1cae5b0c6f1801
tree481b7002423b51a47ee7d1e5356ab1ca12876bbf
parent6821f9423053d127ff9df34bdeec9b44bfc006ce
wilc1000: Add reset/enable GPIO support to SPI driver

For the SDIO driver, the RESET/ENABLE pins of WILC1000 are controlled
through the SDIO power sequence driver.  This commit adds analogous
support for the SPI driver.  Specifically, during initialization, the
chip will be ENABLEd and taken out of RESET and during
deinitialization, the chip will be placed back into RESET and disabled
(both to reduce power consumption and to ensure the WiFi radio is
off).

Both RESET and ENABLE GPIOs are optional.  However, if the ENABLE GPIO
is specified, then the RESET GPIO should normally also be specified as
otherwise there is no way to ensure proper timing of the ENABLE/RESET
sequence.

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211221212531.4011609-2-davidm@egauge.net
drivers/net/wireless/microchip/wilc1000/spi.c
drivers/net/wireless/microchip/wilc1000/wlan.c