From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-renesas-soc@vger.kernel.org, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes
Date: Sat, 28 Sep 2024 09:26:18 +0200 [thread overview]
Message-ID: <388618b1-39a8-464b-a7e8-fb721d1f765c@kernel.org> (raw)
In-Reply-To: <ZvcjSJIMsrRNQT_t@google.com>
On 27/09/2024 23:27, Dmitry Torokhov wrote:
> On Fri, Sep 27, 2024 at 10:30:12AM +0200, Krzysztof Kozlowski wrote:
>> On 27/09/2024 10:15, Wolfram Sang wrote:
>>> Allow interrupt-parent in the main node, so it can be inherited to all
>>> subnodes. This is more compact and less error-prone.
>>>
>>> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>>> ---
>>>
>>> It would fix dtbs_check for arch/arm/boot/dts/renesas/r8a7779-marzen.dts
>>> and would simplify arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts.
>>>
>>> Plus, it is the behaviour I would expect.
>>>
>>> Documentation/devicetree/bindings/input/gpio-keys.yaml | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>> index cc78c2152921..8fc331e01f7e 100644
>>> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>> @@ -15,6 +15,9 @@ properties:
>>> - gpio-keys
>>> - gpio-keys-polled
>>>
>>> + interrupt-parent:
>>> + description: Common interrupt parent for the following subnodes
>>
>> That's a bit against DT spec:
>>
>> "Nodes that represent interrupt-generating devices contain an
>> interrupt-parent property..."
>>
>> but gpio-keys node you marked as interrupt-parent does not generate
>> interrupts, so I do not think this is correct.
>
> I think this can be read multiple ways. The device here is gpio-keys and
> interrupt-parent would be attached to that node. Children nodes do not
> represent individual devices, they just a convenient abstraction to
> describe the hardware.
Not really. There is no device like "gpio-keys". Each key is a separate,
independent device. They are no grouped, they do no share anything. From
Linux perspective they share, but on hardware - zero common pieces,
independent devices.
And this is reflected in interrupts property. Individual devices
generating interrupts - so each key connected over GPIO - has interrupts
property.
Best regards,
Krzysztof
prev parent reply other threads:[~2024-09-28 7:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 8:15 [PATCH] dt-bindings: input: gpio-keys: allow generic 'interrupt-parent' for subnodes Wolfram Sang
2024-09-27 8:30 ` Krzysztof Kozlowski
2024-09-27 8:42 ` Wolfram Sang
2024-09-27 9:09 ` Geert Uytterhoeven
2024-09-27 21:27 ` Dmitry Torokhov
2024-09-28 7:26 ` 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=388618b1-39a8-464b-a7e8-fb721d1f765c@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=wsa+renesas@sang-engineering.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).