[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220605162820.GA12875@nixie71>
Date: Sun, 5 Jun 2022 11:28:20 -0500
From: Jeff LaBundy <jeff@...undy.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Stefan Hansson <newbie13xd@...il.com>,
Andreas Kemnade <andreas@...nade.info>
Subject: Re: [RFC PATCH 1/2] dt-bindings: input: gpio-keys: enforce node
names to match all properties
Hi Krzysztof,
On Sun, Jun 05, 2022 at 05:12:42PM +0200, Krzysztof Kozlowski wrote:
> On 04/06/2022 05:04, Jeff LaBundy wrote:
> >> - dependencies:
> >> - wakeup-event-action: [ wakeup-source ]
> >> - linux,input-value: [ gpios ]
> >> -
> >> - unevaluatedProperties: false
> >> + "^(key|key-[a-z0-9-]+|[a-z0-9-]+-key)$":
> >
> > Maybe this would be better as:
> >
> > "^((key|switch|axis)|(key|switch|axis)-[a-z0-9-]+|[a-z0-9-]+-(key|switch|axis))$":
> >
> > ...or perhaps a more efficient version of my counter-proposal.
> >
> > The reason is because it is confusing to see a lid or dock switch named
> > as "key-lid", etc.
>
> Nice point. "switch" I understand, but can you really have "axis" on
> GPIO keys? I had impression axis is related to joysticks.
I do not think it is very common, but technically we can use gpio-keys
to create coarse sliders as follows:
- linux,code = ABS_X (or ABS_Y, etc.)
- linux,input-type = EV_ABS
- linux,input-value = 0, 10, 20...
Trying to encode all possible values for linux,input-type (EV_*) in the
pattern is not reasonable, so maybe a compromise would be to use 'event'
in place of 'key|switch' because events are what we are ultimately trying
to describe here.
That being said, these are special cases and I don't feel strongly against
simply using 'key|switch' for now as those are by far the most common use-
cases. Another compromise is 'key|switch|event', with 'event' available as
a catch-all for these special cases.
>
>
> Best regards,
> Krzysztof
Kind regards,
Jeff LaBundy
Powered by blists - more mailing lists