From: Rob Herring <robh@kernel.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq
Date: Fri, 11 Aug 2023 09:10:48 -0600 [thread overview]
Message-ID: <20230811151048.GA3452914-robh@kernel.org> (raw)
In-Reply-To: <20230811110432.3968-1-tony@atomide.com>
On Fri, Aug 11, 2023 at 02:04:31PM +0300, Tony Lindgren wrote:
> Allow configuring optional dedicated wakeirq that some SoCs have.
> Let's use the interrupt naming "irq" and "wakeup" that we already have
> in use for some drivers and subsystems like i2c.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> .../devicetree/bindings/input/gpio-keys.yaml | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> @@ -31,7 +31,17 @@ patternProperties:
> maxItems: 1
>
> interrupts:
> - maxItems: 1
> + description:
> + Optional interrupts if different from the gpio interrupt
> + maxItems: 2
> +
> + interrupt-names:
> + description:
> + Optional interrupt names, can be used to specify a separate
> + dedicated wake-up interrupt
> + items:
> + -const: irq
> + -const: wakeup
Also need a space after '-'.
>
> label:
> description: Descriptive name of the key.
> @@ -130,6 +140,9 @@ examples:
> label = "GPIO Key UP";
> linux,code = <103>;
> gpios = <&gpio1 0 1>;
> + interrupts-extended = <&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "wakeup";
That's not what your schema allows. You need:
minItems: 1
items:
- enum: [ irq, wakeup ]
- const: wakeup
(repeating 'wakeup' is disallowed globally for ".*-names".)
> + wakeup-source;
Of course with this, a single interrupt is the wake-up source and
doesn't need a name. So you could define that 'interrupt-names' is only
used when there are 2 interrupts. In that case, the schema is right and
the example is wrong.
Rob
next prev parent reply other threads:[~2023-08-11 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 11:04 [PATCH 1/2] dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq Tony Lindgren
2023-08-11 11:04 ` [PATCH 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs Tony Lindgren
2023-08-11 14:00 ` [PATCH 1/2] dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq Rob Herring
2023-08-11 15:10 ` Rob Herring [this message]
2023-08-14 5:25 ` Tony Lindgren
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=20230811151048.GA3452914-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony@atomide.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).