lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230424162131.GH2701399-robh@kernel.org>
Date:   Mon, 24 Apr 2023 11:21:31 -0500
From:   Rob Herring <robh@...nel.org>
To:     Nikita Shubin <nikita.shubin@...uefel.me>
Cc:     Arnd Bergmann <arnd@...nel.org>, Linus Walleij <linusw@...nel.org>,
        Alexander Sverdlin <alexander.sverdlin@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-input@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 26/43] dt-bindings: input: Add DT bindings ep93xx keypad

On Mon, Apr 24, 2023 at 03:34:42PM +0300, Nikita Shubin wrote:
> Add YAML bindings ep93xx SoC.
> 
> Signed-off-by: Nikita Shubin <nikita.shubin@...uefel.me>
> ---
> 
> Notes:
>     Linus Walleij:
>     - replaced hex with proper <KEY_UP>, etc
> 
>  .../bindings/input/cirrus,ep93xx-keypad.yaml  | 123 ++++++++++++++++++
>  1 file changed, 123 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/cirrus,ep93xx-keypad.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/cirrus,ep93xx-keypad.yaml b/Documentation/devicetree/bindings/input/cirrus,ep93xx-keypad.yaml
> new file mode 100644
> index 000000000000..0310114de22e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/cirrus,ep93xx-keypad.yaml
> @@ -0,0 +1,123 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/cirrus,ep93xx-keypad.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus ep93xx keypad
> +
> +maintainers:
> +  - Dmitry Torokhov <dmitry.torokhov@...il.com>
> +  - Alexander Sverdlin <alexander.sverdlin@...il.com>
> +
> +allOf:
> +  - $ref: "/schemas/input/matrix-keymap.yaml#"

Drop quotes.

> +
> +description: |
> +  The KPP is designed to interface with a keypad matrix with 2-point contact
> +  or 3-point contact keys. The KPP is designed to simplify the software task
> +  of scanning a keypad matrix. The KPP is capable of detecting, debouncing,
> +  and decoding one or multiple keys pressed simultaneously on a keypad.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - cirrus,ep9301-keypad
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    enum:
> +      - ep93xx-keypad
> +
> +  debounce:

I think we have a common property for this.

> +    description: |
> +          Time in microseconds that key must be pressed or
> +          released for state change interrupt to trigger.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  prescale:
> +    description: row/column counter pre-scaler load value
> +    $ref: /schemas/types.yaml#/definitions/uint32

constraints? Or 0-2^32 is valid?

> +
> +  clk-rate:

No, have standard bindings for this.

> +    description: clock rate setting
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  disable-3-key:

Needs a vendor prefix.

> +    type: boolean
> +    description:
> +      Disable 3 Key reset. Setting this disables the three key reset
> +      output to the watchdog reset block.
> +
> +  diag-mode:

Why do we need this in DT. Shouldn't this be a runtime setting.

> +    type: boolean
> +    description:
> +      Key scan diagnostic mode. Setting this allows key scanning to be
> +      directly controlled through the key register by writes from the
> +      ARM Core.
> +
> +  back-drive:

Needs a vendor prefix.

> +    type: boolean
> +    description:
> +      Key scan back driving enable. Setting this enables the key
> +      scanning logic to back drive the row and column pins of the
> +      chip high during the first two column counts in the
> +      row/column counter.
> +
> +  test-mode:

Why do we need this in DT. Shouldn't this be a runtime setting.

> +    type: boolean
> +    description:
> +      Test mode. When this is set, the counter RC_COUNT is advanced
> +      by 8 counts when EN is active. The effect is that only column 0
> +      is checked in each row. This test mode allows a faster test
> +      of the ROW pins.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - linux,keymap
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> +    #include <dt-bindings/input/input.h>
> +    keypad@...f0000 {
> +        compatible = "cirrus,ep9301-keypad";
> +        reg = <0x800f0000 0x0c>;
> +        interrupt-parent = <&vic0>;
> +        interrupts = <29>;
> +        clocks = <&syscon EP93XX_CLK_KEYPAD>;
> +        clock-names = "ep93xx-keypad";
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&keypad_default_pins>;
> +        linux,keymap = <KEY_UP>,
> +                       <KEY_DOWN>,
> +                       <KEY_VOLUMEDOWN>,
> +                       <KEY_HOME>,
> +                       <KEY_RIGHT>,
> +                       <KEY_LEFT>,
> +                       <KEY_ENTER>,
> +                       <KEY_VOLUMEUP>,
> +                       <KEY_F6>,
> +                       <KEY_F8>,
> +                       <KEY_F9>,
> +                       <KEY_F10>,
> +                       <KEY_F1>,
> +                       <KEY_F2>,
> +                       <KEY_F3>,
> +                       <KEY_POWER>;
> +    };
> +
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ