All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff LaBundy <jeff@labundy.com>
To: Rob Herring <robh@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Hans de Goede <hdegoede@redhat.com>, Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Artur Rojek <contact@artur-rojek.eu>,
	Maxime Ripard <mripard@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] dt-bindings: input: Centralize 'linux,code' definition
Date: Wed, 8 Jun 2022 20:32:43 -0500	[thread overview]
Message-ID: <20220609013243.GB191119@nixie71> (raw)
In-Reply-To: <20220608211207.2058487-3-robh@kernel.org>

Hi Rob,

On Wed, Jun 08, 2022 at 03:12:04PM -0600, Rob Herring wrote:
> Multiple bindings use 'linux,code', but there is not a central
> definition and type. Add 'linux,code' to input.yaml and update all the
> users to use it.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

For *iqs*.yaml:

Acked-by: Jeff LaBundy <jeff@labundy.com>

> ---
>  .../devicetree/bindings/input/adc-joystick.yaml   |  2 +-
>  .../input/allwinner,sun4i-a10-lradc-keys.yaml     |  5 ++---
>  .../devicetree/bindings/input/azoteq,iqs7222.yaml |  7 ++-----
>  .../devicetree/bindings/input/gpio-keys.yaml      |  1 -
>  .../devicetree/bindings/input/input.yaml          |  8 ++++++++
>  .../devicetree/bindings/input/iqs269a.yaml        | 15 ++++++---------
>  .../devicetree/bindings/input/iqs626a.yaml        |  5 ++---
>  .../devicetree/bindings/input/iqs62x-keys.yaml    |  5 ++---
>  .../devicetree/bindings/input/max77650-onkey.yaml |  8 ++++----
>  9 files changed, 27 insertions(+), 29 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml
> index 2ee04e03bc22..64d961458ac7 100644
> --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml
> +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml
> @@ -45,6 +45,7 @@ additionalProperties: false
>  patternProperties:
>    "^axis@[0-9a-f]+$":
>      type: object
> +    $ref: input.yaml#
>      description: >
>        Represents a joystick axis bound to the given ADC channel.
>        For each entry in the io-channels list, one axis subnode with a matching
> @@ -57,7 +58,6 @@ patternProperties:
>          description: Index of an io-channels list entry bound to this axis.
>  
>        linux,code:
> -        $ref: /schemas/types.yaml#/definitions/uint32
>          description: EV_ABS specific event code generated by the axis.
>  
>        abs-range:
> diff --git a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
> index 3399fc288afb..9700dc468b25 100644
> --- a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
> @@ -44,14 +44,13 @@ properties:
>  patternProperties:
>    "^button-[0-9]+$":
>      type: object
> +    $ref: input.yaml#
>      properties:
>        label:
>          $ref: /schemas/types.yaml#/definitions/string
>          description: Descriptive name of the key
>  
> -      linux,code:
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -        description: Keycode to emit
> +      linux,code: true
>  
>        channel:
>          $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> index a3a1e5a65306..5ea10fe7ffe9 100644
> --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
> @@ -421,6 +421,7 @@ patternProperties:
>      patternProperties:
>        "^event-(prox|touch)$":
>          type: object
> +        $ref: input.yaml#
>          description:
>            Represents a proximity or touch event reported by the channel.
>  
> @@ -467,11 +468,7 @@ patternProperties:
>                The IQS7222B does not feature channel-specific timeouts; the time-
>                out specified for any one channel applies to all channels.
>  
> -          linux,code:
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -            description:
> -              Numeric key or switch code associated with the event. Specify
> -              KEY_RESERVED (0) to opt out of event reporting.
> +          linux,code: true
>  
>            linux,input-type:
>              $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> index 7fe1966ea28a..cd07107fd5ed 100644
> --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
> @@ -34,7 +34,6 @@ patternProperties:
>  
>          linux,code:
>            description: Key / Axis code to emit.
> -          $ref: /schemas/types.yaml#/definitions/uint32
>  
>          linux,input-type:
>            description:
> diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
> index 43d2f299c332..e3701a0bc500 100644
> --- a/Documentation/devicetree/bindings/input/input.yaml
> +++ b/Documentation/devicetree/bindings/input/input.yaml
> @@ -23,6 +23,14 @@ properties:
>        minimum: 0
>        maximum: 0x2ff
>  
> +  linux,code:
> +    description:
> +      Specifies a single numeric keycode value to be used for reporting
> +      button/switch events. Specify KEY_RESERVED (0) to opt out of event
> +      reporting.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    maximum: 0x2ff
> +
>    poll-interval:
>      description: Poll interval time in milliseconds.
>      $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml
> index 9c154e5e1a91..c22f8f27913a 100644
> --- a/Documentation/devicetree/bindings/input/iqs269a.yaml
> +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml
> @@ -370,6 +370,7 @@ patternProperties:
>      patternProperties:
>        "^event-prox(-alt)?$":
>          type: object
> +        $ref: input.yaml#
>          description:
>            Represents a proximity event reported by the channel in response to
>            a decrease in counts. Node names suffixed with '-alt' instead corre-
> @@ -396,14 +397,13 @@ patternProperties:
>              default: 10
>              description: Specifies the threshold for the event.
>  
> -          linux,code:
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -            description: Numeric key or switch code associated with the event.
> +          linux,code: true
>  
>          additionalProperties: false
>  
>        "^event-touch(-alt)?$":
>          type: object
> +        $ref: input.yaml#
>          description: Represents a touch event reported by the channel.
>  
>          properties:
> @@ -421,14 +421,13 @@ patternProperties:
>              default: 4
>              description: Specifies the hysteresis for the event.
>  
> -          linux,code:
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -            description: Numeric key or switch code associated with the event.
> +          linux,code: true
>  
>          additionalProperties: false
>  
>        "^event-deep(-alt)?$":
>          type: object
> +        $ref: input.yaml#
>          description: Represents a deep-touch event reported by the channel.
>  
>          properties:
> @@ -446,9 +445,7 @@ patternProperties:
>              default: 0
>              description: Specifies the hysteresis for the event.
>  
> -          linux,code:
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -            description: Numeric key or switch code associated with the event.
> +          linux,code: true
>  
>          additionalProperties: false
>  
> diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml
> index 0cb736c541c9..e645521da8ba 100644
> --- a/Documentation/devicetree/bindings/input/iqs626a.yaml
> +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml
> @@ -449,6 +449,7 @@ patternProperties:
>      patternProperties:
>        "^event-(prox|touch|deep)(-alt)?$":
>          type: object
> +        $ref: input.yaml#
>          description:
>            Represents a proximity, touch or deep-touch event reported by the
>            channel in response to a decrease in counts. Node names suffixed with
> @@ -487,9 +488,7 @@ patternProperties:
>                Specifies the hysteresis for the event (touch and deep-touch
>                events only).
>  
> -          linux,code:
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -            description: Numeric key or switch code associated with the event.
> +          linux,code: true
>  
>            linux,input-type:
>              $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml
> index 77fe3b545b35..e677e31fe8fe 100644
> --- a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml
> +++ b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml
> @@ -89,15 +89,14 @@ properties:
>  patternProperties:
>    "^hall-switch-(north|south)$":
>      type: object
> +    $ref: input.yaml#
>      description:
>        Represents north/south-field Hall-effect sensor touch or proximity
>        events. Note that north/south-field orientation is reversed on the
>        IQS620AXzCSR device due to its flip-chip package.
>  
>      properties:
> -      linux,code:
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -        description: Numeric switch code associated with the event.
> +      linux,code: true
>  
>        azoteq,use-prox:
>          $ref: /schemas/types.yaml#/definitions/flag
> diff --git a/Documentation/devicetree/bindings/input/max77650-onkey.yaml b/Documentation/devicetree/bindings/input/max77650-onkey.yaml
> index 3a2ad6ec64db..48edc0c8c1dd 100644
> --- a/Documentation/devicetree/bindings/input/max77650-onkey.yaml
> +++ b/Documentation/devicetree/bindings/input/max77650-onkey.yaml
> @@ -16,15 +16,15 @@ description: |
>    The onkey controller is represented as a sub-node of the PMIC node on
>    the device tree.
>  
> +allOf:
> +  - $ref: input.yaml#
> +
>  properties:
>    compatible:
>      const: maxim,max77650-onkey
>  
>    linux,code:
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -    description:
> -      The key-code to be reported when the key is pressed. Defaults
> -      to KEY_POWER.
> +    default: 116  # KEY_POWER
>  
>    maxim,onkey-slide:
>      $ref: /schemas/types.yaml#/definitions/flag
> -- 
> 2.34.1
> 

Kind regards,
Jeff LaBundy

  reply	other threads:[~2022-06-09  1:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 21:12 [PATCH v2 0/5] dt-bindings: input: Common property clean-ups and adc-keys conversion Rob Herring
2022-06-08 21:12 ` [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff Rob Herring
2022-06-09  1:29   ` Jeff LaBundy
2022-06-09  5:46   ` Heinrich Schuchardt
2022-06-10 13:23     ` Rob Herring
2022-06-08 21:12 ` [PATCH v2 2/5] dt-bindings: input: Centralize 'linux,code' definition Rob Herring
2022-06-09  1:32   ` Jeff LaBundy [this message]
2022-06-12 16:17   ` Artur Rojek
2022-07-03  5:29   ` Samuel Holland
2022-06-08 21:12 ` [PATCH v2 3/5] dt-bindings: input: Use common 'linux,keycodes' definition Rob Herring
2022-06-09  1:34   ` Jeff LaBundy
2022-06-08 21:12 ` [PATCH v2 4/5] dt-bindings: input: Centralize 'linux,input-type' definition Rob Herring
2022-06-09  1:38   ` Jeff LaBundy
2022-06-08 21:12 ` [PATCH v2 5/5] dt-bindings: input: Convert adc-keys to DT schema Rob Herring
2022-06-09  5:49   ` Heinrich Schuchardt
2022-06-28 17:51 ` [PATCH v2 0/5] dt-bindings: input: Common property clean-ups and adc-keys conversion Rob Herring
2022-07-08 22:20   ` Dmitry Torokhov

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=20220609013243.GB191119@nixie71 \
    --to=jeff@labundy.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=brgl@bgdev.pl \
    --cc=contact@artur-rojek.eu \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    --cc=xypron.glpk@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.