From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Linux Input <linux-input@vger.kernel.org>, devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: input: Convert gpio-keys bindings to schema
Date: Sun, 26 Jan 2020 18:30:19 -0800 [thread overview]
Message-ID: <20200127023019.GD184237@dtor-ws> (raw)
In-Reply-To: <CAL_JsqLNG0i9QbRiueXAZ6LjAGN7Mx0vaoUM43np8Jn4qOuiZg@mail.gmail.com>
On Thu, Jan 23, 2020 at 07:35:06PM -0600, Rob Herring wrote:
> On Thu, Jan 23, 2020 at 4:25 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > 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.
>
> Okay, it wasn't clear to me reading the binding doc. I'll make it conditional.
Actually, I think we can make it usable in interrupt-driver driver. For
EV_REL events we do not need to "go back to 0", and for EV_ABS, if
desired, we could allow specifying an option to scan all GPIOs
on any interrupt. This obviously will not work for pure interrupt
devices (where we do not have GPIOs).
Thanks.
--
Dmitry
prev parent reply other threads:[~2020-01-27 2:30 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
2020-01-24 1:35 ` Rob Herring
2020-01-27 2:30 ` Dmitry Torokhov [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=20200127023019.GD184237@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).