1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/microchip/wilc1000
Alexis Lothoré f3ec643947 wifi: wilc1000: revert reset line logic flip
This reverts commit fcf690b0b4.

When using a wilc1000 chip over a spi bus, users can optionally define a
reset gpio and a chip enable gpio. The reset line of wilc1000 is active
low, so to hold the chip in reset, a low (physical) value must be applied.

The corresponding device tree binding documentation was introduced by
commit f31ee3c0a5 ("wilc1000: Document enable-gpios and reset-gpios
properties") and correctly indicates that the reset line is an active-low
signal. The corresponding driver part, brought by commit ec031ac479
("wilc1000: Add reset/enable GPIO support to SPI driver") was applying the
correct logic. But commit fcf690b0b4 ("wifi: wilc1000: use correct
sequence of RESET for chip Power-UP/Down") eventually flipped this logic
and started misusing the gpiod APIs, applying an inverted logic when
powering up/down the chip (for example, setting the reset line to a logic
"1" during power up, which in fact asserts the reset line when device tree
describes the reset line as GPIO_ACTIVE_LOW). As a consequence, any
platform currently using the driver in SPI mode must use a faulty reset
line description in device tree, or else chip will be maintained in reset
and will not even allow to bring up the chip.

Fix reset line usage by inverting back the gpiod APIs usage, setting the
reset line to the logic value "0" when powering the chip, and the logic
value "1" when powering off the chip.

Fixes: fcf690b0b4 ("wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down")
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@bootlin.com
2024-02-21 20:56:45 +02:00
..
cfg80211.c wifi: wilc1000: remove AKM suite be32 conversion for external auth request 2024-02-21 20:54:34 +02:00
cfg80211.h wifi: wilc1000: Remove unused declarations 2023-08-23 14:12:17 +03:00
fw.h wifi: wilc1000: add IGTK support 2022-05-30 14:18:00 +03:00
hif.c wifi: wilc1000: add missing read critical sections around vif list traversal 2024-02-19 18:21:36 +02:00
hif.h wifi: wilc1000: simplify wilc_scan() 2023-11-08 20:07:55 +02:00
Kconfig wilc1000: Add support for enabling CRC 2021-04-17 20:47:40 +03:00
Makefile wilc1000: use API version number info along with firmware filename 2020-07-14 20:52:27 +03:00
mon.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
netdev.c wifi: wilc1000: add missing read critical sections around vif list traversal 2024-02-19 18:21:36 +02:00
netdev.h wifi: wilc1000: use SRCU instead of RCU for vif list traversal 2024-02-19 18:21:35 +02:00
sdio.c wifi: fill in MODULE_DESCRIPTION()s for wilc1000 2024-01-31 18:32:33 +02:00
spi.c wifi: wilc1000: revert reset line logic flip 2024-02-21 20:56:45 +02:00
wlan.c wifi: wilc1000: use SRCU instead of RCU for vif list traversal 2024-02-19 18:21:35 +02:00
wlan.h wifi: wilc1000: validate chip id during bus probe 2024-02-15 13:09:16 +02:00
wlan_cfg.c wifi: wilc1000: get correct length of string WID from received config packet 2022-07-27 15:58:10 +03:00
wlan_cfg.h wifi: wilc1000: Increase ASSOC response buffer 2023-05-11 15:53:44 +03:00
wlan_if.h wifi: wilc1000: Increase ASSOC response buffer 2023-05-11 15:53:44 +03:00