From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Daniel Scally <djrscally@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance"
Date: Mon, 8 Mar 2021 18:31:40 +0200 [thread overview]
Message-ID: <YEZRbO3uJQmsCZO9@smile.fi.intel.com> (raw)
In-Reply-To: <YEZEX+BCw21O6rmT@smile.fi.intel.com>
On Mon, Mar 08, 2021 at 05:35:59PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 08, 2021 at 04:25:05PM +0100, Maximilian Luz wrote:
> > Following commit 036e126c72eb ("pinctrl: intel: Split
> > intel_pinctrl_add_padgroups() for better maintenance"),
> > gpiochip_get_desc() is broken on some Kaby Lake R devices (specifically
> > a Microsoft Surface Book 2), returning -EINVAL for GPIOs that in reality
> > should be there (they are defined in ACPI and have been accessible
> > previously). Due to this, gpiod_get() fails with -ENOENT.
> >
> > Reverting this commit fixes that issue and the GPIOs in question are
> > accessible again.
>
> I would like to have more information.
> Can you enable PINCTRL and GPIO debug options in the kernel, and show dmesg
> output (when kernel command line has 'ignore_loglevel' option) for both working
> and non-working cases?
>
> Also if it's possible to have DSDT.dsl of the device in question along with
> output of `grep -H 15 /sys/bus/acpi/devices/*/status`.
>
> > There is probably a better option than straight up reverting this, so
> > consider this more of a bug-report.
>
> Indeed.
Can you test if the below helps (probably you have to apply it by editing
the file manually):
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -1392,6 +1392,7 @@ static int intel_pinctrl_add_padgroups_by_size(struct intel_pinctrl *pctrl,
gpps[i].size = min(gpp_size, npins);
npins -= gpps[i].size;
+ gpps[i].gpio_base = gpps[i].base;
gpps[i].padown_num = padown_num;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-03-08 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 15:25 [PATCH] Revert "pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance" Maximilian Luz
2021-03-08 15:35 ` Andy Shevchenko
2021-03-08 16:31 ` Andy Shevchenko [this message]
2021-03-08 16:43 ` Maximilian Luz
2021-03-08 16:46 ` Andy Shevchenko
2021-03-08 16:47 ` Maximilian Luz
2021-03-08 16:32 ` Maximilian Luz
2021-03-08 16:42 ` Andy Shevchenko
2021-03-08 16:44 ` Maximilian Luz
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=YEZRbO3uJQmsCZO9@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).