[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <170854181192.1918455.14748300319931361175.kvalo@kernel.org>
Date: Wed, 21 Feb 2024 18:56:53 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: Alexis Lothoré <alexis.lothore@...tlin.com>
Cc: linux-wireless@...r.kernel.org, Ajay Singh <ajay.kathat@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
David Mosberger-Tang <davidm@...uge.net>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
linux-kernel@...r.kernel.org, Conor Dooley <conor.dooley@...rochip.com>,
Alexis Lothoré <alexis.lothore@...tlin.com>
Subject: Re: [PATCH v2] wifi: wilc1000: revert reset line logic flip
Alexis Lothoré <alexis.lothore@...tlin.com> wrote:
> 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@...tlin.com>
> Acked-by: Conor Dooley <conor.dooley@...rochip.com>
> Acked-by: Ajay Singh <ajay.kathat@...rochip.com>
Patch applied to wireless-next.git, thanks.
f3ec64394763 wifi: wilc1000: revert reset line logic flip
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@bootlin.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists