From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API
Date: Mon, 3 Mar 2025 22:39:32 +0200 [thread overview]
Message-ID: <Z8YThNku95-oPPNB@surfacebook.localdomain> (raw)
In-Reply-To: <CACRpkdbCfhqRGOGrCgP-e3AnK_tmHX+eUpZKjitbfemzAXCcWg@mail.gmail.com>
Mon, Mar 03, 2025 at 09:00:39PM +0100, Linus Walleij kirjoitti:
> On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
...
> > reinit_completion(&priv->ca8210_is_awake);
> > msleep(ms);
> > - gpio_set_value(pdata->gpio_reset, 1);
> > + gpiod_set_value(pdata->reset_gpio, 1);
>
> This drives the GPIO low to assert reset, meaning it is something
> that should have GPIO_ACTIVE_LOW set in the device tree,
Yeah, the pin 27 is marked as NRESET and description is pointing out to it as
active low.
> and it might even have, so let's check what we can check:
>
> git grep cascoda,ca8210
> Documentation/devicetree/bindings/net/ieee802154/ca8210.txt: -
> compatible: Should be "cascoda,ca8210"
> Documentation/devicetree/bindings/net/ieee802154/ca8210.txt:
> compatible = "cascoda,ca8210";
> drivers/net/ieee802154/ca8210.c: {.compatible = "cascoda,ca8210", },
>
> well ain't that typical, all users are out of tree. The example
> in the bindings file is wrong, setting ACTIVE_HIGH. Sigh, let's
> assume all those DTS files somewhere are wrong and they
> didn't set GPIO_ACTIVE_LOW in them...
> Maybe add a comment in the code that this is wrong and the
> driver and DTS files should be fixed.
Or maybe fix in the driver and schema and add a quirk to gpiolib-of.c?
> Alternatively patch Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
> to set GPIO_ACTIVE_LOW and fix the code to invert it both
> here and when getting the GPIO, but it could cause problems
> for outoftree users.
Would it? We have such quirks to fix a polarity for other drivers/devices.
> Either way, this is good progress:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Thank you!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-03-03 20:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 16:49 [PATCH v2 0/3] ieee802154: ca8210: Sparse fix and GPIOd conversion Andy Shevchenko
2025-03-03 16:49 ` [PATCH net-next v2 1/3] ieee802154: ca8210: Use proper setter and getters for bitwise types Andy Shevchenko
2025-03-03 19:51 ` Linus Walleij
2025-03-03 16:49 ` [PATCH net-next v2 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata() Andy Shevchenko
2025-03-03 19:53 ` Linus Walleij
2025-03-04 8:18 ` Miquel Raynal
2025-03-03 16:49 ` [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API Andy Shevchenko
2025-03-03 20:00 ` Linus Walleij
2025-03-03 20:39 ` Andy Shevchenko [this message]
2025-03-04 0:03 ` Linus Walleij
2025-03-04 11:13 ` Andy Shevchenko
2025-03-05 7:40 ` Linus Walleij
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=Z8YThNku95-oPPNB@surfacebook.localdomain \
--to=andy.shevchenko@gmail.com \
--cc=alex.aring@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stefan@datenfreihafen.org \
/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