2022-06-08 21:26:12

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff

The maximum keycode value for Linux is 0x2ff, not 0xff. There's already
users and examples with values greater than 0xff, but the schema is not
yet applied in those cases.

Signed-off-by: Rob Herring <[email protected]>
---
Documentation/devicetree/bindings/input/input.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
index d41d8743aad4..43d2f299c332 100644
--- a/Documentation/devicetree/bindings/input/input.yaml
+++ b/Documentation/devicetree/bindings/input/input.yaml
@@ -21,7 +21,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
minimum: 0
- maximum: 0xff
+ maximum: 0x2ff

poll-interval:
description: Poll interval time in milliseconds.
--
2.34.1


2022-06-09 01:57:30

by Jeff LaBundy

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff

Hi Rob,

On Wed, Jun 08, 2022 at 03:12:03PM -0600, Rob Herring wrote:
> The maximum keycode value for Linux is 0x2ff, not 0xff. There's already
> users and examples with values greater than 0xff, but the schema is not
> yet applied in those cases.
>
> Signed-off-by: Rob Herring <[email protected]>

As the creator of a few said examples:

Reviewed-by: Jeff LaBundy <[email protected]>

> ---
> Documentation/devicetree/bindings/input/input.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
> index d41d8743aad4..43d2f299c332 100644
> --- a/Documentation/devicetree/bindings/input/input.yaml
> +++ b/Documentation/devicetree/bindings/input/input.yaml
> @@ -21,7 +21,7 @@ properties:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> items:
> minimum: 0
> - maximum: 0xff
> + maximum: 0x2ff
>
> poll-interval:
> description: Poll interval time in milliseconds.
> --
> 2.34.1
>

Thank you for driving this series.

Kind regards,
Jeff LaBundy

2022-06-09 05:58:04

by Heinrich Schuchardt

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff

On 6/8/22 23:12, Rob Herring wrote:
> The maximum keycode value for Linux is 0x2ff, not 0xff. There's already
> users and examples with values greater than 0xff, but the schema is not
> yet applied in those cases.
>
> Signed-off-by: Rob Herring <[email protected]>
> ---
> Documentation/devicetree/bindings/input/input.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
> index d41d8743aad4..43d2f299c332 100644
> --- a/Documentation/devicetree/bindings/input/input.yaml
> +++ b/Documentation/devicetree/bindings/input/input.yaml
> @@ -21,7 +21,7 @@ properties:
> $ref: /schemas/types.yaml#/definitions/uint32-array
> items:
> minimum: 0
> - maximum: 0xff
> + maximum: 0x2ff

Can this value of 0x2ff be make exportable such that we can use it as a
reference in devicetree/bindings/input/adc-keys.yaml. E.g. define a type
that only take values in the 0-0x2ff range?

Best regards

Heinrich

>
> poll-interval:
> description: Poll interval time in milliseconds.

2022-06-10 13:49:36

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff

On Thu, Jun 09, 2022 at 07:46:51AM +0200, Heinrich Schuchardt wrote:
> On 6/8/22 23:12, Rob Herring wrote:
> > The maximum keycode value for Linux is 0x2ff, not 0xff. There's already
> > users and examples with values greater than 0xff, but the schema is not
> > yet applied in those cases.
> >
> > Signed-off-by: Rob Herring <[email protected]>
> > ---
> > Documentation/devicetree/bindings/input/input.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
> > index d41d8743aad4..43d2f299c332 100644
> > --- a/Documentation/devicetree/bindings/input/input.yaml
> > +++ b/Documentation/devicetree/bindings/input/input.yaml
> > @@ -21,7 +21,7 @@ properties:
> > $ref: /schemas/types.yaml#/definitions/uint32-array
> > items:
> > minimum: 0
> > - maximum: 0xff
> > + maximum: 0x2ff
>
> Can this value of 0x2ff be make exportable such that we can use it as a
> reference in devicetree/bindings/input/adc-keys.yaml. E.g. define a type
> that only take values in the 0-0x2ff range?

There's no need. The $ref to input.yaml in does that effectively
already. That's why 'linux,code' doesn't need any schema constraints
unless it has additional constraints. max77650-onkey.yaml in patch 2 has
an example of that. If you wanted to add a new, custom property with
those constraints, then we could do something like this:

$defs:
input-codes:
minimum: 0
maximum: 0x2ff
...

And then have: $ref: input.yaml#/$defs/input-codes

Rob