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] [day] [month] [year] [list]
Message-ID: <6e8a6fc2-88c2-4655-a8f0-45ece45170e2@linaro.org>
Date:   Wed, 6 Dec 2023 11:37:48 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Allen_Lin <allencl_lin@...mail.com>, dmitry.torokhov@...il.com,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        conor+dt@...nel.org, jikos@...nel.org,
        benjamin.tissoires@...hat.com, linux-input@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: input: Add Himax HX83102J touchscreen

On 05/12/2023 11:05, Allen_Lin wrote:
> Add the HX83102j touchscreen device tree bindings documents.
> 
> Signed-off-by: Allen_Lin <allencl_lin@...mail.com>
> ---
>  .../bindings/input/himax,hx8310xx.yaml        | 70 +++++++++++++++++++
>  MAINTAINERS                                   |  6 ++
>  2 files changed, 76 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/himax,hx8310xx.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/himax,hx8310xx.yaml b/Documentation/devicetree/bindings/input/himax,hx8310xx.yaml
> new file mode 100644
> index 000000000000..1cc65e9bd267
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/himax,hx8310xx.yaml

Filename like compatible, so himax,hx83102j.yaml

> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/himax,hx8310xx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: himax hx8310xx touchscreen

Himax? HiMax? lowercase "himax" seems wrong and your commit msg also
suggest different capitalization. The same for "hx8310xx". And it is not
"xx" but 2J.

> +
> +maintainers:
> +  - Allen Lin <allencl_lin@...mail.com>
> +
> +description:
> +  Supports the himax hx8310xx touchscreen.

Drop sentence, instead describe hardware like "Himax HX83102J is a
touchscreen connected over SPI ...."

> +  This touchscreen uses the spi-hid protocol but has some non-standard
> +  power sequencing required.
> +
> +allOf:
> +  - $ref: /schemas/input/touchscreen/touchscreen.yaml#

Missing ref to spi-peripheral-props

> +
> +properties:
> +  compatible:
> +    enum:
> +      - himax,hx83102j
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  spi-cpha: true
> +
> +  spi-cpol: true
> +
> +  spi-max-frequency: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - reset-gpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/qcom,rpmh.h>

Why? Drop


> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      hid_himax_spi@0 {

No underscores in node names.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


> +        pinctrl-names = "default";
> +        pinctrl-0 = <&touch_int0 &touch_reset>;
> +        reg = <0>;

Oh damn... ok, so compatible is always the first property. Reg is second.

> +        spi-max-frequency = <12500000>;
> +        status = "okay";

Drop

> +        compatible = "himax,hx83102j";
> +        reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
> +        spi-cpha;
> +        spi-cpol;
> +        interrupt-parent = <&gpio1>;
> +        interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> +      };
> +    };



Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ