From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Hans de Goede <johannes.goede@oss.qualcomm.com>
Cc: Andy Shevchenko <andy@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Bartosz Golaszewski <brgl@kernel.org>,
Linus Walleij <linusw@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: x86-android-tablets: fix gpio_secondary_fwnode_init() not working
Date: Tue, 8 Sep 2026 22:04:16 +0300 (EEST) [thread overview]
Message-ID: <1106cecc-3151-8fe5-e51b-b6c5816ae73a@linux.intel.com> (raw)
In-Reply-To: <2666d5fe-994b-4f5f-ae5a-60ce9fffb867@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]
On Tue, 8 Sep 2026, Hans de Goede wrote:
> Hi Ilpo,
>
> On 3-Sep-26 13:54, Ilpo Järvinen wrote:
> > On Tue, 1 Sep 2026, Andy Shevchenko wrote:
> >
> >> On Mon, Aug 31, 2026 at 10:11:57PM +0200, Hans de Goede wrote:
> >>> acpi_bus_find_device_by_name() call returns a pointer to the device object
> >>> on the ACPI bus, aka the ACPI companion device.
> >>>
> >>> gpio_secondary_fwnode_init() then continues with setting the secondary
> >>> fwnode on this device. But this is not the actual physical device for
> >>> the GPIO controller (e.g. the GPIO controller platform bus device).
> >>>
> >>> This mismatch is causing GPIO lookups by secondary fwnode to not work.
> >>>
> >>> Modify gpio_secondary_fwnode_init() to instead set the secondary fwnode
> >>> of the first physical device associated with the ACPI companion device.
> >>>
> >>> This fixes the GPIO lookups not working.
> >>
> >> ...
> >>
> >>> static int gpio_secondary_fwnode_init(struct device *parent,
> >>
> >>> if (WARN_ON(!fwnode))
> >>> return -ENOENT;
> >>>
> >>> - set_secondary_fwnode(dev, fwnode);
> >>> + struct device *phys_dev = acpi_get_first_physical_node(to_acpi_device(dev));
> >>
> >> It doesn't look like an auto cleaning pointer, so let's make a declaration
> >> outside of the code?
> >>
> >>> + if (!phys_dev)
> >>> + return dev_err_probe(parent,
> >>> + -ENODEV, "No physical device for ACPI GPIO dev: %s\n",
> >>> + (*swnode)->name);
> >>
> >> Hmm... Why not %pfwP?
> >
> > Hi Hans,
> >
> > I'm waiting for v2.
>
> I see, thank you for quoting Andy's email since it never made the list (1),
> nor did it reach me.
>
> I'll prepare a v2 addressing Andy's remarks.
>
> Regards,
>
>
> Hans
>
>
> 1) If you go to:
>
> https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/#r
>
> it shows a "not found" <apcRAvoHkh9blDwK@black.igk.intel.com> entry, which it
> only knows about because of this reply to it by you (Ilpo).
Yeah, I noticed it didn't end up into patchwork either but figured you'd
see the content from my reply if the original had failed to reach you.
I've applied v2 now, thanks.
--
i.
next prev parent reply other threads:[~2026-09-08 19:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 20:11 [PATCH] platform/x86: x86-android-tablets: fix gpio_secondary_fwnode_init() not working Hans de Goede
2026-08-31 20:22 ` Dmitry Torokhov
2026-08-31 20:28 ` Hans de Goede
2026-08-31 20:34 ` Dmitry Torokhov
[not found] ` <apcRAvoHkh9blDwK@black.igk.intel.com>
2026-09-03 11:54 ` Ilpo Järvinen
2026-09-08 17:51 ` Hans de Goede
2026-09-08 19:04 ` Ilpo Järvinen [this message]
2026-09-09 14:11 ` Andy Shevchenko
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=1106cecc-3151-8fe5-e51b-b6c5816ae73a@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andy@kernel.org \
--cc=brgl@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linusw@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@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