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]
Date:   Sun, 18 Sep 2022 10:50:46 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Astrid Rost <astrid.rost@...s.com>,
        Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Dylan Reid <dgreid@...omium.org>,
        Rob Herring <robh+dt@...nel.org>
Cc:     kernel@...s.c, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, Astrid Rost <astridr@...s.com>,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: sound: ts3a227e: convert to yaml

On 15/09/2022 12:39, Astrid Rost wrote:
> Convert from ts3a227e.txt to yaml.
> 
> Signed-off-by: Astrid Rost <astrid.rost@...s.com>

Thank you for your patch. There is something to discuss/improve.

> ---
>  .../devicetree/bindings/sound/ts3a227e.txt    | 30 --------
>  .../devicetree/bindings/sound/ts3a227e.yaml   | 69 +++++++++++++++++++
>  2 files changed, 69 insertions(+), 30 deletions(-)


> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/ts3a227e.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/sound/ts3a227e.yaml#"


Filename based on compatible, so ti,ts3a227e.yaml

> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes from both lines above.

> +
> +title: Texas Instruments TS3A227E
> +  Autonomous Audio Accessory Detection and Configuration Switch
> +
> +maintainers:
> +  - Dylan Reid <dgreid@...omium.org>
> +
> +description: |
> +  The TS3A227E detect headsets of 3-ring and 4-ring standards and
> +  switches automatically to route the microphone correctly. It also
> +  handles key press detection in accordance with the Android audio
> +  headset specification v1.0.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,ts3a227e
> +
> +  reg:
> +    description: I2C address of the device.

Skip description, it's obvious.

> +    const: 0x3b
> +
> +  interrupts:
> +    maxItems: 1
> +    description: |
> +      Interrupt number for /INT pin from the ts3a227e.

Skip description

> +
> +  ti,micbias:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Intended MICBIAS voltage (datasheet section 9.6.7).
> +    enum:
> +      - 0 # 2.1 V
> +      - 1 # 2.2 V
> +      - 2 # 2.3 V
> +      - 3 # 2.4 V
> +      - 4 # 2.5 V
> +      - 5 # 2.6 V
> +      - 6 # 2.7 V
> +      - 7 # 2.8 V
> +    default: 2

Old bindings said default is 1. It this was intended, please mention in
commit msg deviations from pure conversion.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>

This header is not used.

> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c0 {

Node name just "i2c"

> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        codec: ts3a227e@3b {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

audio-controller? audio-switch?

> +            compatible = "ti,ts3a227e";
> +            reg = <0x3b>;
> +            interrupt-parent = <&gpio1>;
> +            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> +        };
> +    };
> +
> +...


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ