diff mbox series

[v3,1/4] wilc1000: use correct sequence of RESET for chip Power-UP/Down

Message ID 20220524120606.9675-1-ajay.kathat@microchip.com
State New
Headers show
Series [v3,1/4] wilc1000: use correct sequence of RESET for chip Power-UP/Down | expand

Commit Message

Ajay Singh May 24, 2022, 12:06 p.m. UTC
From: Ajay Singh <ajay.kathat@microchip.com>

For power-up sequence, WILC expects RESET set to high 5ms after making
chip_en(enable) so corrected chip power-up sequence by making RESET high.
For Power-Down sequence, the correct sequence make RESET and CHIP_EN low
without any extra delay.

Fixes: ec031ac4792c ("wilc1000: Add reset/enable GPIO support to SPI driver")
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---

 v2: No changes

 v3: add "Fixes" tag in commit description
 
 drivers/net/wireless/microchip/wilc1000/spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kalle Valo May 30, 2022, 11:18 a.m. UTC | #1
<Ajay.Kathat@microchip.com> wrote:

> From: Ajay Singh <ajay.kathat@microchip.com>
> 
> For power-up sequence, WILC expects RESET set to high 5ms after making
> chip_en(enable) so corrected chip power-up sequence by making RESET high.
> For Power-Down sequence, the correct sequence make RESET and CHIP_EN low
> without any extra delay.
> 
> Fixes: ec031ac4792c ("wilc1000: Add reset/enable GPIO support to SPI driver")
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>

4 patches applied to wireless-next.git, thanks.

fcf690b0b474 wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down
3c76ec880588 wifi: wilc1000: remove WEP security support
c5b331d4f550 wifi: wilc1000: add WPA3 SAE support
0e703de3ef41 wifi: wilc1000: add IGTK support
diff mbox series

Patch

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 18420e954402..2ae8dd3411ac 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -191,11 +191,11 @@  static void wilc_wlan_power(struct wilc *wilc, bool on)
 		/* assert ENABLE: */
 		gpiod_set_value(gpios->enable, 1);
 		mdelay(5);
-		/* deassert RESET: */
-		gpiod_set_value(gpios->reset, 0);
-	} else {
 		/* assert RESET: */
 		gpiod_set_value(gpios->reset, 1);
+	} else {
+		/* deassert RESET: */
+		gpiod_set_value(gpios->reset, 0);
 		/* deassert ENABLE: */
 		gpiod_set_value(gpios->enable, 0);
 	}