From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Michal Vokáč" <michal.vokac@ysoft.com>
Cc: Rob Herring <robh@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/5] dt-bindings: input: Add poll-interval property
Date: Tue, 15 Oct 2019 17:23:28 -0700 [thread overview]
Message-ID: <20191016002328.GJ105649@dtor-ws> (raw)
In-Reply-To: <1616be35-c06a-db84-bc6e-045195f163d7@ysoft.com>
On Fri, Oct 11, 2019 at 10:03:25AM +0200, Michal Vokáč wrote:
> On 10. 10. 19 22:01, Dmitry Torokhov wrote:
> > On Thu, Oct 10, 2019 at 02:40:36PM -0500, Rob Herring wrote:
> > > On Thu, Oct 03, 2019 at 08:12:54AM +0200, Michal Vokáč wrote:
> > > > Add an option to periodicaly poll the device to get state of the inputs
> > > > as the interrupt line may not be used on some platforms.
> > > >
> > > > Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
> > > > ---
> > > > Changes since v2:
> > > > - None
> > > >
> > > > Changes since v1:
> > > > - Use poll-interval instead of linux,poll-interval.
> > > > - Place the poll-interval binding into the common schema.
> > > > - Properly describe that either interrupts or poll-interval property is
> > > > required.
> > > > - Fix the example to pass validation.
> > > >
> > > > .../bindings/input/fsl,mpr121-touchkey.yaml | 25 +++++++++++++++++++++-
> > > > Documentation/devicetree/bindings/input/input.yaml | 4 ++++
> > > > 2 files changed, 28 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> > > > index c6fbcdf78556..035b2fee4491 100644
> > > > --- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> > > > +++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
> > > > @@ -17,6 +17,10 @@ description: |
> > > > allOf:
> > > > - $ref: input.yaml#
> > > > +oneOf:
> > >
> > > It should be valid to have both properties present, right?
> >
> > The poll does not really sense and does not have any effect when
> > interrupt is supplied.
>
> From technical point of view, yes it is possible to have both
> properties. But I agree that it does not really make sense to
> use both at the same time.
>
> > > The h/w description can't know what the OS supports.
> >
> > It also has no idea what OS does at all and whether it even pays
> > attention to any of these properties. We are just trying to say here "I
> > do not have an interrupt wired, so for this device's primary use case
> > (that is coupled with a certain $PRIMARY OS) we need to poll the
> > controller ever so often to handle our use case".
>
> If I understand correctly the relationship between Linux and DT
> binding, in Linux we are free to implement just part of all the
> possible configuration options described by the binding.
>
> In this case if somebody would enable both interrupt and polling,
> we will happily use the interrupt mode only. Maybe it would be nice
> to at least print a message that the poll-intervall is ignored?
>
> > > In that case, we should use 'anyOf' here instead.
>
> What I am afraid of is that some DT writers may really use both
> properties and expect that Linux will actually do something useful
> in this case. Anyway, I am OK with that.
OK, I changed it to "anyOf", folded into driver change and applied.
--
Dmitry
next prev parent reply other threads:[~2019-10-16 0:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 6:12 [PATCH v3 0/5] Add polling mode to the MPR121 touchkey Michal Vokáč
2019-10-03 6:12 ` [PATCH v3 1/5] dt-bindings: input: Add common input binding in json-schema Michal Vokáč
2019-10-10 19:35 ` Rob Herring
2019-10-16 0:23 ` Dmitry Torokhov
2019-10-03 6:12 ` [PATCH v3 2/5] dt-bindings: input: Convert mpr121 binding to json-schema Michal Vokáč
2019-10-04 13:58 ` Michal Vokáč
2019-10-10 19:36 ` Rob Herring
2019-10-16 0:24 ` Dmitry Torokhov
2019-10-03 6:12 ` [PATCH v3 3/5] dt-bindings: input: Add poll-interval property Michal Vokáč
2019-10-10 19:40 ` Rob Herring
2019-10-10 20:01 ` Dmitry Torokhov
2019-10-11 8:03 ` Michal Vokáč
2019-10-16 0:23 ` Dmitry Torokhov [this message]
2019-10-16 5:52 ` Michal Vokáč
2019-10-03 6:12 ` [PATCH v3 4/5] Input: mpr121: Add polling mode Michal Vokáč
2019-10-16 0:24 ` Dmitry Torokhov
2019-10-03 6:12 ` [PATCH v3 5/5] ARM: dts: imx6dl-yapp4: Enable the MPR121 touchkey controller on Hydra Michal Vokáč
2019-10-16 6:07 ` Michal Vokáč
2019-10-25 2:48 ` Shawn Guo
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=20191016002328.GJ105649@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=michal.vokac@ysoft.com \
--cc=robh@kernel.org \
--cc=shawnguo@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).