linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Daniel Scally <djrscally@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <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:42:14 +0200	[thread overview]
Message-ID: <CAHp75Vd9N_U7NobAwpYkqGoOCVNYbBSTkZ1vpgziOfgAf=c0wQ@mail.gmail.com> (raw)
In-Reply-To: <c306b082-f97a-96d8-1291-78ff14c4ea88@gmail.com>

On Mon, Mar 8, 2021 at 6:34 PM Maximilian Luz <luzmaximilian@gmail.com> wrote:
>
> On 3/8/21 4:35 PM, 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?
>
> Sure.
>
> Here are dmesg logs for:
>
>   - Kernel v5.12-rc2 (not working): https://paste.ubuntu.com/p/HVZybcvQDH/

Thanks!

Yeah, yeah... Please, test my patch, I am quite sure it will fix the issue.

[    0.335705] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 0->23
[    0.335711] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 24->47
[    0.335716] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 48->71
[    0.335721] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 72->95
[    0.335725] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 96->119
[    0.335730] gpio gpiochip0: (INT344B:00): created GPIO range 0->23
==> INT344B:00 PIN 120->143
[    0.335734] gpio gpiochip0: (INT344B:00): created GPIO range 0->7
==> INT344B:00 PIN 144->151


>   - Kernel v5.12-rc2 with 036e126c72eb reverted: https://paste.ubuntu.com/p/hwcXFvhcBd/
>
> > 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`.
>
> You can find the DSDT and a full ACPI dump at [1] and GPIOs that fail at
> [2] and [3].
>
> [1]: https://github.com/linux-surface/acpidumps/tree/master/surface_book_2
> [2]: https://github.com/linux-surface/acpidumps/blob/62972f0d806cef45ca01341e3cfbabc04c6dd583/surface_book_2/dsdt.dsl#L15274-L15285
> [3]: https://github.com/linux-surface/acpidumps/blob/62972f0d806cef45ca01341e3cfbabc04c6dd583/surface_book_2/dsdt.dsl#L17947-L17982
>
> `grep -H 15 /sys/bus/acpi/devices/*/status` yields
>
> /sys/bus/acpi/devices/ACPI0003:00/status:15
> /sys/bus/acpi/devices/ACPI000C:00/status:15
> /sys/bus/acpi/devices/ACPI000E:00/status:15
> /sys/bus/acpi/devices/device:16/status:15
> /sys/bus/acpi/devices/device:17/status:15
> /sys/bus/acpi/devices/device:31/status:15
> /sys/bus/acpi/devices/device:71/status:15
> /sys/bus/acpi/devices/INT33A1:00/status:15
> /sys/bus/acpi/devices/INT33BE:00/status:15
> /sys/bus/acpi/devices/INT3400:00/status:15
> /sys/bus/acpi/devices/INT3403:01/status:15
> /sys/bus/acpi/devices/INT3403:02/status:15
> /sys/bus/acpi/devices/INT3403:06/status:15
> /sys/bus/acpi/devices/INT3403:07/status:15
> /sys/bus/acpi/devices/INT3403:08/status:15
> /sys/bus/acpi/devices/INT3403:09/status:15
> /sys/bus/acpi/devices/INT3403:11/status:15
> /sys/bus/acpi/devices/INT3407:00/status:15
> /sys/bus/acpi/devices/INT344B:00/status:15
> /sys/bus/acpi/devices/INT3472:00/status:15
> /sys/bus/acpi/devices/INT3472:01/status:15
> /sys/bus/acpi/devices/INT3472:02/status:15
> /sys/bus/acpi/devices/INT347A:00/status:15
> /sys/bus/acpi/devices/INT347E:00/status:15
> /sys/bus/acpi/devices/INT3F0D:00/status:15
> /sys/bus/acpi/devices/LNXPOWER:07/status:15
> /sys/bus/acpi/devices/MSHW0005:00/status:15
> /sys/bus/acpi/devices/MSHW0029:00/status:15
> /sys/bus/acpi/devices/MSHW0036:00/status:15
> /sys/bus/acpi/devices/MSHW0040:00/status:15
> /sys/bus/acpi/devices/MSHW0042:00/status:15
> /sys/bus/acpi/devices/MSHW0045:00/status:15
> /sys/bus/acpi/devices/MSHW0084:00/status:15
> /sys/bus/acpi/devices/MSHW0091:00/status:15
> /sys/bus/acpi/devices/MSHW0107:00/status:15
> /sys/bus/acpi/devices/MSHW0133:00/status:15
> /sys/bus/acpi/devices/MSHW0153:00/status:15
> /sys/bus/acpi/devices/NTC0103:00/status:15
> /sys/bus/acpi/devices/PNP0103:00/status:15
> /sys/bus/acpi/devices/PNP0C0D:00/status:15
>
> This output is the same for both versions.

It was expected.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2021-03-08 16:43 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
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 [this message]
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='CAHp75Vd9N_U7NobAwpYkqGoOCVNYbBSTkZ1vpgziOfgAf=c0wQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=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).