From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Markus Probst <markus.probst@posteo.de>,
Linus Walleij <linus.walleij@linaro.org>,
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: Tue, 7 Oct 2025 16:57:46 +0900 [thread overview]
Message-ID: <6942a236-ac52-4402-a0ab-bd1765e03636@kernel.org> (raw)
In-Reply-To: <CAMRc=Medke+Dr7ti6OpMW6j=RDU0AO19pJUmPa_cvSXyW16OPw@mail.gmail.com>
On 07/10/2025 16:49, Bartosz Golaszewski wrote:
> On Tue, Oct 7, 2025 at 3:14 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 03/10/2025 17:51, Bartosz Golaszewski wrote:
>>> On Fri, Oct 3, 2025 at 10:40 AM Markus Probst <markus.probst@posteo.de> wrote:
>>>>
>>>> On Fri, 2025-10-03 at 10:03 +0200, Bartosz Golaszewski wrote:
>>>>> On Thu, Oct 2, 2025 at 11:58 PM Markus Probst
>>>>> <markus.probst@posteo.de> wrote:
>>>>>>
>>>>>> sometimes it is necessary to use both acpi and device tree to
>>>>>> declare
>>>>>
>>>>> This is a rather controversial change so "sometimes" is not
>>>>> convincing
>>>>> me. I would like to see a user of this added in upstream to consider
>>>>> it.
>>>>>
>>>>>> 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
>>>>>
>>>>> What is the use-case here because I'm unable to wrap my head around
>>>>> it? Referencing devices described in ACPI from DT? How would the
>>>>> associated DT source look like?
>>>> 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. An example for a regulator defined in DT using a gpio in
>>>> ACPI (in this case controlling the power of on of the usb ports):
>>>>
>>>> gpio: gpio-controller@fed81500 {
>>>> acpi-path = "\\_SB_.GPIO";
>>>> #gpio-cells = <2>;
>>>> };
>>>>
>>>> vbus1_regulator: fixedregulator@0 {
>>>> compatible = "regulator-fixed";
>>>> regulator-name = "vbus1_regulator";
>>>> regulator-min-microvolt = <5000000>;
>>>> regulator-max-microvolt = <5000000>;
>>>> gpio = <&gpio 0x2a 0x01>;
>>>> };
>>>>
>>>> - Markus Probst
>>>>>
>>>
>>> Krzysztof: Could you please look at this and chime in? Does this make any sense?
>>
>>
>> There is no such property as acpi-path and I don't see here any ABI
>> being documented. Nothing in dtschema, either. Nothing in DT spec. I
>> also did not receive this patch. Actually - nothing from
>> markus.probst@posteo.de in mail mailbox.
>>
>> So no clue what is this about, but if you want to use undocumented
>> property then obviously no.
>>
>
> I interpret this as a vague proposal of adding a way of referencing
> ACPI nodes from DT source and this is my question: does this make any
> sense? It doesn't to me at first glance but we do sometimes describe
> firmware details in DT so I figured I'd ask you.
I am not aware of mixed ACPI+DT systems and it looks like that's the
purpose. And PRP0001 still assumes you are having ACPI system...
https://docs.kernel.org/firmware-guide/acpi/enumeration.html#device-tree-namespace-link-device-id
In any case, we rarely discuss ABI via driver patch. Any discussions
should come via patch proposing this ABI - either to kernel bindings or
to dtschema.
>
> It seems like Markus found a different solution in the end so it may
> not even be important anymore.
>
> Bartosz
Best regards,
Krzysztof
prev parent reply other threads:[~2025-10-07 7:57 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
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 [this message]
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=6942a236-ac52-4402-a0ab-bd1765e03636@kernel.org \
--to=krzk@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).