linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: David Heidelberg <david@ixit.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, ~okias/devicetree@lists.sr.ht
Subject: Re: [PATCH] WIP: dt-bindings: input: microchip,cap11xx: Convert txt bindings to yaml
Date: Tue, 19 Oct 2021 17:28:04 -0500	[thread overview]
Message-ID: <YW9GdDq4uUXNd07h@robh.at.kernel.org> (raw)
In-Reply-To: <20211009105922.48835-1-david@ixit.cz>

On Sat, Oct 09, 2021 at 12:59:22PM +0200, David Heidelberg wrote:
> Convert binding for the Microchip CAP11xx series HW to the YAML syntax.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../devicetree/bindings/input/cap11xx.txt     |  78 ----------
>  .../bindings/input/microchip,cap11xx.yaml     | 146 ++++++++++++++++++
>  2 files changed, 146 insertions(+), 78 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/input/cap11xx.txt
>  create mode 100644 Documentation/devicetree/bindings/input/microchip,cap11xx.yaml


> diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> new file mode 100644
> index 000000000000..89079c019794
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
> @@ -0,0 +1,146 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/input/microchip,cap11xx.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Device tree bindings for Microchip CAP11xx based capacitive touch sensors
> +
> +description: |
> +  The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive
> +  touch controllers and LED drivers. The device communication via I2C only.
> +
> +maintainers:
> +  - Rob Herring <robh+dt@kernel.org>

robh@kernel.org

But why isn't this the author of the binding or driver.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - microchip,cap1106
> +      - microchip,cap1126
> +      - microchip,cap1188
> +
> +  reg:
> +    maxItems: 1
> +
> +  '#address-cells':
> +    const: 1

blank line

> +  '#size-cells':
> +    const: 0
> +
> +  interrupts:
> +    maxItems: 1
> +    description: |
> +      Property describing the interrupt line the
> +      device's ALERT#/CM_IRQ# pin is connected to.
> +      The device only has one interrupt source.
> +
> +  autorepeat:
> +    description: |
> +      Enables the Linux input system's autorepeat feature on the input device.
> +
> +  linux,keycodes:
> +    minItems: 6
> +    maxItems: 6
> +    description: |
> +      Specifies an array of numeric keycode values to
> +      be used for the channels. If this property is
> +      omitted, KEY_A, KEY_B, etc are used as defaults.
> +      The array must have exactly six entries.
> +
> +  microchip,sensor-gain:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 1
> +    enum: [1, 2, 4, 8]
> +    description: |
> +      Defines the gain of the sensor circuitry. This
> +      effectively controls the sensitivity, as a
> +      smaller delta capacitance is required to
> +      generate the same delta count values.
> +
> +  microchip,irq-active-high:
> +    type: boolean
> +    description: |
> +      By default the interrupt pin is active low
> +      open drain. This property allows using the active
> +      high push-pull output.
> +
> +patternProperties:
> +  "^led@[0-7]$":
> +    type: object
> +    description: CAP11xx LEDs
> +    $ref: ../leds/common.yaml#

/schemas/leds/common.yaml#

> +
> +    properties:
> +      reg:
> +        enum: [0, 1, 2, 3, 4, 5, 6, 7]
> +
> +      label: true
> +
> +      linux,default-trigger: true
> +
> +      default-state: true
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false
> +
> +allOf:

     - $ref: input.yaml#

> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - microchip,cap1106
> +    then:
> +      patternProperties:
> +        "^led@[0-7]$": false
> +
> +required:
> +  - compatible
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      cap1188@28 {
> +        compatible = "microchip,cap1188";
> +        interrupt-parent = <&gpio1>;
> +        interrupts = <0 0>;
> +        reg = <0x28>;
> +        autorepeat;
> +        microchip,sensor-gain = <2>;
> +
> +        linux,keycodes = <103>,	/* KEY_UP */
> +                         <106>,	/* KEY_RIGHT */
> +                         <108>,	/* KEY_DOWN */
> +                         <105>,	/* KEY_LEFT */
> +                         <109>,	/* KEY_PAGEDOWN */
> +                         <104>;	/* KEY_PAGEUP */
> +
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        led@0 {
> +                label = "cap11xx:green:usr0";
> +                reg = <0>;
> +        };
> +
> +        led@1 {
> +                label = "cap11xx:green:usr1";
> +                reg = <1>;
> +        };
> +
> +        led@2 {
> +                label = "cap11xx:green:alive";
> +                reg = <2>;
> +                linux,default-trigger = "heartbeat";
> +        };
> +      };
> +    };
> -- 
> 2.33.0
> 
> 

      reply	other threads:[~2021-10-19 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 10:59 [PATCH] WIP: dt-bindings: input: microchip,cap11xx: Convert txt bindings to yaml David Heidelberg
2021-10-19 22:28 ` Rob Herring [this message]

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=YW9GdDq4uUXNd07h@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=~okias/devicetree@lists.sr.ht \
    /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).