Patch "wifi: wilc1000: revert reset line logic flip" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: wilc1000: revert reset line logic flip

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-wilc1000-revert-reset-line-logic-flip.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit efc30bc90c477b665ec430a3e3128a247f5888a5
Author: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
Date:   Sat Feb 17 14:22:41 2024 +0100

    wifi: wilc1000: revert reset line logic flip
    
    [ Upstream commit f3ec643947634bed41b97bd56b248f7c78498eab ]
    
    This reverts commit fcf690b0b47494df51d214db5c5a714a400b0257.
    
    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 f31ee3c0a555 ("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 ec031ac4792c
    ("wilc1000: Add reset/enable GPIO support to SPI driver") was applying the
    correct logic. But commit fcf690b0b474 ("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: fcf690b0b474 ("wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down")
    Signed-off-by: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
    Acked-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
    Acked-by: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://msgid.link/20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index b0fc5e68feeca..5877e2c1fa0fc 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);
-		/* assert RESET: */
-		gpiod_set_value(gpios->reset, 1);
-	} else {
 		/* deassert RESET: */
 		gpiod_set_value(gpios->reset, 0);
+	} else {
+		/* assert RESET: */
+		gpiod_set_value(gpios->reset, 1);
 		/* deassert ENABLE: */
 		gpiod_set_value(gpios->enable, 0);
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux