From: Genes Lists <lists@sapience.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: rc4 and later log message: gpiochip_add_data_with_key: get_direction failed -> pincntrl patch?
Date: Sat, 29 Mar 2025 06:59:10 -0400 [thread overview]
Message-ID: <d4204a3c44b31c6527b91558f9691b6a05faaadc.camel@sapience.com> (raw)
In-Reply-To: <76e77de144a51d345c3542dd77dd0bdd86e4d5e5.camel@sapience.com>
[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]
On Sun, 2025-03-16 at 08:48 -0400, Genes Lists wrote:
> On Tue, 2025-03-11 at 10:40 -0700, Bartosz Golaszewski wrote:
> > On Tue, 11 Mar 2025 15:03:59 +0100, Genes Lists
> > <lists@sapience.com> said:
> > > On Sat, 2025-03-08 at 15:45 -0500, Genes Lists wrote:
> > > > ......
>
> >
> > There are two problems here. The issue you're seeing is fixed in
> > next but
> > not in mainline due to my omission. I will send a patch for that.
> >
> > On the other hand, the pinctrl driver in question should be fixed
> > too.
> > Can you try the following change:
> >
> > diff --git a/drivers/pinctrl/intel/pinctrl-intel.c
> > b/drivers/pinctrl/intel/pinctrl-intel.c
> > index d889c7c878e2..0c6925b53d9f 100644
> > --- a/drivers/pinctrl/intel/pinctrl-intel.c
> > +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> > @@ -1068,7 +1068,11 @@ static int intel_gpio_get_direction(struct
> > gpio_chip *chip, unsigned int offset)
> >
> > pin = intel_gpio_to_pin(pctrl, offset, NULL, NULL);
> > if (pin < 0)
> > - return -EINVAL;
> > + /*
> > + * For pins configured to functions other than
> > GPIO, default
> > + * to the safe INPUT value.
> > + */
> > + return GPIO_LINE_DIRECTION_IN;
> >
> > reg = intel_get_padcfg(pctrl, pin, PADCFG0);
> > if (!reg)
> >
> > ?
> >
> > FYI: This was uncovered by commit 9d846b1aebbe ("gpiolib: check the
> > return value of gpio_chip::get_direction()").
> >
> > Bart
>
> Hi Bart - I don't see this pincntrl patch in mainline yet - what's
> your thinking on this?
>
> thanks!
>
(resending in plain text - sorry about that)
Hi Bart - I don't see this pincntrl patch in linus tree - what's your
thinking around this?
thanks!
--
Gene
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-03-29 10:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 20:45 rc4 and later log message: gpiochip_add_data_with_key: get_direction failed Genes Lists
2025-03-11 14:03 ` Genes Lists
2025-03-11 17:40 ` Bartosz Golaszewski
2025-03-11 19:30 ` Genes Lists
2025-03-11 19:32 ` Genes Lists
2025-03-11 19:50 ` Bartosz Golaszewski
2025-03-11 20:53 ` Genes Lists
2025-03-16 12:48 ` Genes Lists
2025-03-28 10:00 ` rc4 and later log message: gpiochip_add_data_with_key: get_direction failed -> missing pinctrl patch Genes Lists
2025-03-28 11:00 ` Bartosz Golaszewski
2025-03-29 10:59 ` Genes Lists [this message]
2025-03-31 7:36 ` rc4 and later log message: gpiochip_add_data_with_key: get_direction failed -> pincntrl patch? Bartosz Golaszewski
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=d4204a3c44b31c6527b91558f9691b6a05faaadc.camel@sapience.com \
--to=lists@sapience.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).