From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: input: Convert gpio-keys bindings to schema
Date: Thu, 23 Jan 2020 14:25:08 -0800 [thread overview]
Message-ID: <20200123222508.GB184237@dtor-ws> (raw)
In-Reply-To: <20200123214222.17897-1-robh@kernel.org>
Hi Rob,
On Thu, Jan 23, 2020 at 03:42:22PM -0600, Rob Herring wrote:
> Convert the gpio-keys and gpio-keys-polled bindings to a DT schema. As
> both bindings are almost the same, combine them into a single schema.
>
> The binding said 'interrupts' was required, but testing on dts files
> showed that it isn't required.
>
> 'linux,input-value' was only documented for gpio-keys-polled, but there
> doesn't seem to be any reason for it to be specific to that.
Actually, there is: with gpio-keys-polled we take a "snapshot" of the
entire device state, so we know when to generate a 0 event (the example
we have a device with several GPIOs with values assigned 1, 2, 3, 4, 5..
values, when one of the gpios is active we generate event with given
value, when all are inactive we generate 0 event). This does not work
for interrupt-only driven device.
> +
> + properties:
> + gpios:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
We support "interrupt-only" mode where we do not have GPIO, so for
"gpio-keys" we need either interrupts or gpios or both, and for polled
we must have gpios (and I guess we simply ignore interrupts if they are
specified).
Does this binding manages to enforce this?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2020-01-23 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 21:42 [PATCH] dt-bindings: input: Convert gpio-keys bindings to schema Rob Herring
2020-01-23 22:25 ` Dmitry Torokhov [this message]
2020-01-24 1:35 ` Rob Herring
2020-01-27 2:30 ` Dmitry Torokhov
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=20200123222508.GB184237@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=robh@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).