From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: David Mosberger-Tang <davidm@egauge.net>, linux-wireless@vger.kernel.org
Cc: Ajay Singh <ajay.kathat@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Kalle Valo <kvalo@kernel.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] wifi: wilc1000: fix reset line assert/deassert polarity
Date: Tue, 13 Feb 2024 17:58:04 +0100 [thread overview]
Message-ID: <081bce96-f485-414c-8051-e1c14271f8cc@bootlin.com> (raw)
In-Reply-To: <2ff1c701f3443e1c612a81f4077b0280850f57c6.camel@egauge.net>
On 2/13/24 17:42, David Mosberger-Tang wrote:
> On Tue, 2024-02-13 at 16:22 +0100, Alexis Lothoré wrote:
>> 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. However, the corresponding driver part, brought by commit
>> ec031ac4792c ("wilc1000: Add reset/enable GPIO support to SPI driver"), is
>> misusing the gpiod APIs and apply 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).
>
> Note that commit ec031ac4792c is doing the right thing in regards to an
> ACTIVE_LOW RESET pin and the binding documentation is consistent with that code.
>
> It was later on that commit fcf690b0 flipped the RESET line polarity to treat it
> as GPIO_ACTIVE_HIGH. I never understood why that was done and, as you noted, it
> introduced in inconsistency with the binding documentation.
Ah, you are right, and I was wrong citing your GPIOs patch as faulty
(git-blaming too fast !), thanks for the clarification. I missed this patch from
Ajay (fcf690b0) flipping the reset logic. Maybe he had issues while missing
proper device tree configuration and then submitted this flip ?
> On our platform, we never merged commit fcf690b0 and hence our DTS already
> defines the RESET pin as GPIO_ACTIVE_LOW. So, I don't have any issues at all
> with your patch! :-)
So in the end, the patch should be about a mere revert. I will update
accordingly when relevant, but before that I'll wait for some feedback about the
potential issue of this patch (forcing users to udpate faulty devicetree)
Thanks,
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-02-13 16:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 15:22 Alexis Lothoré
2024-02-13 16:42 ` David Mosberger-Tang
2024-02-13 16:58 ` Alexis Lothoré [this message]
2024-02-15 4:35 ` Ajay.Kathat
2024-02-16 16:01 ` Kalle Valo
2024-02-16 16:54 ` Conor Dooley
2024-02-16 16:55 ` Conor Dooley
2024-02-16 18:07 ` Kalle Valo
2024-02-17 0:10 ` Ajay.Kathat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=081bce96-f485-414c-8051-e1c14271f8cc@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=ajay.kathat@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=davidm@egauge.net \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®