From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Markus Probst <markus.probst@posteo.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Mika Westerberg <westeri@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: of: make it possible to reference gpios probed in acpi in device tree
Date: Fri, 3 Oct 2025 11:05:50 +0200 [thread overview]
Message-ID: <20251003090550.GC2912318@black.igk.intel.com> (raw)
In-Reply-To: <940aad63e18a1415983a9b8f5e206f26a84c0299.camel@posteo.de>
On Fri, Oct 03, 2025 at 08:44:12AM +0000, Markus Probst wrote:
> On Fri, 2025-10-03 at 06:54 +0200, Mika Westerberg wrote:
> > Hi,
> >
> > On Thu, Oct 02, 2025 at 09:58:05PM +0000, Markus Probst wrote:
> > > sometimes it is necessary to use both acpi and device tree to
> > > declare
> > > devices. Not every gpio device driver which has an acpi_match_table
> > > has
> > > an of_match table (e.g. amd-pinctrl). Furthermore gpio is an device
> > > which
> > > can't be easily disabled in acpi and then redeclared in device
> > > tree, as
> > > it often gets used by other devices declared in acpi (e.g. via
> > > GpioInt or
> > > GpioIo). Thus a disable of acpi and migration to device tree is not
> > > always
> > > possible or very time consuming, while acpi by itself is very
> > > limited and
> > > not always sufficient. This won't affect most configurations, as
> > > most of
> > > the time either CONFIG_ACPI or CONFIG_OF gets enabled, not both.
> >
> > Can you provide a real example where this kind of mixup can happen?
> In my specific usecase for the Synology DS923+, there are gpios for
> powering the usb vbus on (powered down by default), also for powering
> on sata disks. (defining a fixed-regulator for the usb vbus for
> example)
Okay regulators are Power Resources in ACPI.
> > The
> > ACPI ID PRP0001 specifically was added to allow using DT bindings in
> > ACPI
> > based systems.
> Hmm, would requiring patching of the acpi tables. Not sure if it would
> work with the fixed-regulator though, as it uses dev->of_node instead
> of dev->fwnode. I will try to see if I can make it work this way.
I think you can do this by using SSDT overlays instead of patching the
tables:
https://docs.kernel.org/admin-guide/acpi/ssdt-overlays.html
There is configfs interface too.
next prev parent reply other threads:[~2025-10-03 9:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 21:58 [PATCH] gpio: of: make it possible to reference gpios probed in acpi in device tree Markus Probst
2025-10-03 4:54 ` Mika Westerberg
2025-10-03 8:44 ` Markus Probst
2025-10-03 9:05 ` Mika Westerberg [this message]
2025-10-03 13:04 ` Markus Probst
2025-10-03 13:50 ` Markus Probst
2025-10-03 19:31 ` Markus Probst
2025-10-03 8:03 ` Bartosz Golaszewski
2025-10-03 8:40 ` Markus Probst
2025-10-03 8:51 ` Bartosz Golaszewski
2025-10-03 10:57 ` Krzysztof Kozlowski
2025-10-07 1:14 ` Krzysztof Kozlowski
2025-10-07 7:49 ` Bartosz Golaszewski
2025-10-07 7:57 ` Krzysztof Kozlowski
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=20251003090550.GC2912318@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.probst@posteo.de \
--cc=westeri@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