diff mbox series

[RFC,2/2] dt-bindings: input: gpio-keys: document label and autorepeat properties

Message ID 20220603101601.542054-3-krzysztof.kozlowski@linaro.org (mailing list archive)
State New, archived
Headers show
Series dt-bindings: input: gpio-keys: rework matching children | expand

Commit Message

Krzysztof Kozlowski June 3, 2022, 10:16 a.m. UTC
The original text bindings documented "autorepeat" and "label"
properties (in the device node, beside the nodes with keys).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/input/gpio-keys.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Dmitry Torokhov June 3, 2022, 4:43 p.m. UTC | #1
On Fri, Jun 03, 2022 at 12:16:01PM +0200, Krzysztof Kozlowski wrote:
> The original text bindings documented "autorepeat" and "label"
> properties (in the device node, beside the nodes with keys).
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/input/gpio-keys.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> index 49d388dc8d78..b1c910a5e233 100644
> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> @@ -15,6 +15,14 @@ properties:
>        - gpio-keys
>        - gpio-keys-polled
>  
> +  autorepeat:
> +    type: boolean
> +    description:
> +      Enable operating system (not hardware) key auto repeat feature.

Should we refer to the generic input device property here instead (one
on described in input.yaml)?

Thanks.
Krzysztof Kozlowski June 5, 2022, 3:15 p.m. UTC | #2
On 03/06/2022 18:43, Dmitry Torokhov wrote:
> On Fri, Jun 03, 2022 at 12:16:01PM +0200, Krzysztof Kozlowski wrote:
>> The original text bindings documented "autorepeat" and "label"
>> properties (in the device node, beside the nodes with keys).
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  Documentation/devicetree/bindings/input/gpio-keys.yaml | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> index 49d388dc8d78..b1c910a5e233 100644
>> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>> @@ -15,6 +15,14 @@ properties:
>>        - gpio-keys
>>        - gpio-keys-polled
>>  
>> +  autorepeat:
>> +    type: boolean
>> +    description:
>> +      Enable operating system (not hardware) key auto repeat feature.
> 
> Should we refer to the generic input device property here instead (one
> on described in input.yaml)?

You mean copy the description from input.yaml or say something like:
"see input.yaml"?


Best regards,
Krzysztof
Rob Herring June 8, 2022, 9:20 p.m. UTC | #3
On Sun, Jun 5, 2022 at 9:15 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 03/06/2022 18:43, Dmitry Torokhov wrote:
> > On Fri, Jun 03, 2022 at 12:16:01PM +0200, Krzysztof Kozlowski wrote:
> >> The original text bindings documented "autorepeat" and "label"
> >> properties (in the device node, beside the nodes with keys).
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> ---
> >>  Documentation/devicetree/bindings/input/gpio-keys.yaml | 8 ++++++++
> >>  1 file changed, 8 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> >> index 49d388dc8d78..b1c910a5e233 100644
> >> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> >> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> >> @@ -15,6 +15,14 @@ properties:
> >>        - gpio-keys
> >>        - gpio-keys-polled
> >>
> >> +  autorepeat:
> >> +    type: boolean
> >> +    description:
> >> +      Enable operating system (not hardware) key auto repeat feature.
> >
> > Should we refer to the generic input device property here instead (one
> > on described in input.yaml)?
>
> You mean copy the description from input.yaml or say something like:
> "see input.yaml"?

No, just:

$ref: input.yaml#
properties:
  autorepeat: true

And 'poll-interval' needs its definition removed.

It's a bit strange for input.yaml to be referenced in both the parent
and child nodes, but that's the nature of the input bindings. Maybe
input.yaml could be split? Doesn't really look like it to me. The main
issue with one file is the users need to list out which properties
they use (not a bad thing).

Note that this series (patch 1) is going to conflict with what I just
sent out[1].

Rob

[1] https://lore.kernel.org/all/20220608211207.2058487-1-robh@kernel.org/
Krzysztof Kozlowski June 9, 2022, 6:52 a.m. UTC | #4
On 08/06/2022 23:20, Rob Herring wrote:
> On Sun, Jun 5, 2022 at 9:15 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 03/06/2022 18:43, Dmitry Torokhov wrote:
>>> On Fri, Jun 03, 2022 at 12:16:01PM +0200, Krzysztof Kozlowski wrote:
>>>> The original text bindings documented "autorepeat" and "label"
>>>> properties (in the device node, beside the nodes with keys).
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> ---
>>>>  Documentation/devicetree/bindings/input/gpio-keys.yaml | 8 ++++++++
>>>>  1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>>> index 49d388dc8d78..b1c910a5e233 100644
>>>> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>>> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
>>>> @@ -15,6 +15,14 @@ properties:
>>>>        - gpio-keys
>>>>        - gpio-keys-polled
>>>>
>>>> +  autorepeat:
>>>> +    type: boolean
>>>> +    description:
>>>> +      Enable operating system (not hardware) key auto repeat feature.
>>>
>>> Should we refer to the generic input device property here instead (one
>>> on described in input.yaml)?
>>
>> You mean copy the description from input.yaml or say something like:
>> "see input.yaml"?
> 
> No, just:
> 
> $ref: input.yaml#
> properties:
>   autorepeat: true
> 
> And 'poll-interval' needs its definition removed.
> 
> It's a bit strange for input.yaml to be referenced in both the parent
> and child nodes, but that's the nature of the input bindings. Maybe
> input.yaml could be split? Doesn't really look like it to me. The main
> issue with one file is the users need to list out which properties
> they use (not a bad thing).
> 
> Note that this series (patch 1) is going to conflict with what I just
> sent out[1].

I can rebase on top of it.

I understand that idea of the series looks good, so I will work on DTSes
and v2 of this.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
index 49d388dc8d78..b1c910a5e233 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
+++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
@@ -15,6 +15,14 @@  properties:
       - gpio-keys
       - gpio-keys-polled
 
+  autorepeat:
+    type: boolean
+    description:
+      Enable operating system (not hardware) key auto repeat feature.
+
+  label:
+    description: Name of entire device
+
 patternProperties:
   "^(key|key-[a-z0-9-]+|[a-z0-9-]+-key)$":
     $ref: input.yaml#