linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 05/10] dt-bindings: input: adp5588-keys: add bindings
Date: Mon, 11 Jul 2022 17:03:05 -0600	[thread overview]
Message-ID: <20220711230305.GA424857-robh@kernel.org> (raw)
In-Reply-To: <20220708093448.42617-6-nuno.sa@analog.com>

On Fri, Jul 08, 2022 at 11:34:43AM +0200, Nuno Sá wrote:
> Add device tree bindings for the adp5588-keys driver.
> 
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
>  .../bindings/input/adi,adp5588-keys.yaml      | 110 ++++++++++++++++++
>  MAINTAINERS                                   |   1 +
>  2 files changed, 111 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/adi,adp5588-keys.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/adi,adp5588-keys.yaml b/Documentation/devicetree/bindings/input/adi,adp5588-keys.yaml
> new file mode 100644
> index 000000000000..c079af8a063d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/adi,adp5588-keys.yaml
> @@ -0,0 +1,110 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/adi,adp5588-keys.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADP5588 Keypad Controller
> +
> +maintainers:
> +  - Nuno Sá <nuno.sa@analog.com>
> +
> +description: |
> +  Analog Devices Mobile I/O Expander and QWERTY Keypad Controller
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf
> +
> +allOf:
> +  - $ref: "/schemas/input/matrix-keymap.yaml#"
> +  - $ref: input.yaml#

Be consistent with paths and quotes. Don't need quotes. Use either full 
path or no path.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,adp5588-keys
> +      - adi,adp5587-keys

'-keys' is redundant. The device doesn't do anything else. IOW, it's not 
sub-block of an SoC.

> +
> +  reg:
> +    maxItems: 1
> +
> +  vcc-supply:
> +    description: Supply Voltage Input
> +
> +  reset-gpios:
> +    description:
> +      If specified, it will be asserted during driver probe. As the line is
> +      active low, it should be marked GPIO_ACTIVE_LOW.
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-controller:
> +    description:
> +      This property applies if either keypad,num-rows lower than 8 or
> +      keypad,num-columns lower than 10.
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  interrupt-controller:
> +    description:
> +      This property applies if either keypad,num-rows lower than 8 or
> +      keypad,num-columns lower than 10.
> +
> +  '#interrupt-cells':
> +    const: 2
> +
> +  adi,unlock-keys:
> +    description:
> +      Specifies a maximum of 2 keys that can be used to unlock the keypad.
> +      If this property is set, the keyboard will be locked and only unlocked
> +      after these keys are pressed. If only one key is set, a double click is
> +      needed to unlock the keypad.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    maxItems: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - keypad,num-rows
> +  - keypad,num-columns
> +  - linux,keymap
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/input/input.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    i2c {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          adp5588@34 {
> +                  compatible = "adi,adp5588-keys";
> +                  reg = <0x34>;
> +
> +                  vcc-supply = <&vcc>;
> +                  interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
> +                  interrupt-parent = <&gpio>;
> +                  reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
> +
> +                  keypad,num-rows = <1>;
> +                  keypad,num-columns = <9>;
> +                  linux,keymap = <
> +                        MATRIX_KEY(0x00, 0x00, KEY_1)
> +                        MATRIX_KEY(0x00, 0x01, KEY_2)
> +                        MATRIX_KEY(0x00, 0x02, KEY_3)
> +                        MATRIX_KEY(0x00, 0x03, KEY_4)
> +                        MATRIX_KEY(0x00, 0x04, KEY_5)
> +                        MATRIX_KEY(0x00, 0x05, KEY_6)
> +                        MATRIX_KEY(0x00, 0x06, KEY_7)
> +                        MATRIX_KEY(0x00, 0x07, KEY_8)
> +                        MATRIX_KEY(0x00, 0x08, KEY_9)
> +                 >;
> +          };
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 41037cfd75fe..f9c09f0ed0d4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -548,6 +548,7 @@ M:	Michael Hennerich <michael.hennerich@analog.com>
>  S:	Supported
>  W:	http://wiki.analog.com/ADP5588
>  W:	https://ez.analog.com/linux-software-drivers
> +F:	Documentation/devicetree/bindings/input/adi,adp5588-keys.yaml
>  F:	drivers/input/keyboard/adp5588-keys.c
>  
>  ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863)
> -- 
> 2.37.0
> 
> 

  reply	other threads:[~2022-07-11 23:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08  9:34 [PATCH 00/10] adp5588-keys refactor and fw properties support Nuno Sá
2022-07-08  9:34 ` [PATCH 01/10] input: keyboard: adp5588-keys: support gpi key events as 'gpio keys' Nuno Sá
2022-07-08 14:18   ` Andy Shevchenko
2022-07-08 14:55     ` Sa, Nuno
2022-07-08 15:04       ` Andy Shevchenko
2022-07-08 15:24         ` Sa, Nuno
2022-07-11 14:16           ` Nuno Sá
2022-07-09  4:10   ` kernel test robot
2022-07-09 11:52     ` Andy Shevchenko
2022-07-12  5:29   ` kernel test robot
2022-07-08  9:34 ` [PATCH 02/10] gpio: gpio-adp5588: drop the driver Nuno Sá
2022-07-08 13:28   ` Bartosz Golaszewski
2022-07-08  9:34 ` [PATCH 03/10] input: keyboard: adp5588-keys: bail out on returned error Nuno Sá
2022-07-08 14:25   ` Andy Shevchenko
2022-07-08 14:35     ` Sa, Nuno
2022-07-08 14:57       ` Andy Shevchenko
2022-07-08  9:34 ` [PATCH 04/10] input: keyboard: adp5588-keys: add support for fw properties Nuno Sá
2022-07-08 14:56   ` Andy Shevchenko
2022-07-08 15:04     ` Sa, Nuno
2022-07-08 15:07       ` Andy Shevchenko
2022-07-12 14:31         ` Nuno Sá
2022-07-09  1:14   ` kernel test robot
2022-07-08  9:34 ` [PATCH 05/10] dt-bindings: input: adp5588-keys: add bindings Nuno Sá
2022-07-11 23:03   ` Rob Herring [this message]
2022-07-08  9:34 ` [PATCH 06/10] input: keyboard: adp5588-keys: do not check for irq presence Nuno Sá
2022-07-08  9:34 ` [PATCH 07/10] input: keyboard: adp5588-keys: fix coding style warnings Nuno Sá
2022-07-08 14:49   ` Andy Shevchenko
2022-07-08 15:05     ` Sa, Nuno
2022-07-08 15:10       ` Andy Shevchenko
2022-07-08  9:34 ` [PATCH 08/10] input: keyboard: adp5588-keys: add optional reset gpio Nuno Sá
2022-07-11 12:52   ` Linus Walleij
2022-07-08  9:34 ` [PATCH 09/10] input: keyboard: adp5588-keys: add regulator support Nuno Sá
2022-07-08 14:47   ` Andy Shevchenko
2022-07-08 15:00     ` Sa, Nuno
2022-07-08  9:34 ` [PATCH 10/10] input: keyboard: adp5588-keys: Use new PM macros Nuno Sá
2022-07-08 13:59 ` [PATCH 00/10] adp5588-keys refactor and fw properties support Andy Shevchenko

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=20220711230305.GA424857-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    /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).