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: <de5197c7-5b68-8bb6-cb3f-0278e1112d86@linaro.org>
Date:   Tue, 4 Oct 2022 13:26:07 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Ciprian Regus <ciprian.regus@...log.com>, jic23@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, robh+dt@...nel.org,
        andriy.shevchenko@...ux.intel.com, linux-kernel@...r.kernel.org,
        linux-iio@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml

On 04/10/2022 09:18, Ciprian Regus wrote:
> Add devicetree bindings documentation for the AD5754 DAC driver.
> 
> Signed-off-by: Ciprian Regus <ciprian.regus@...log.com>
> ---
>  .../bindings/iio/dac/adi,ad5754.yaml          | 173 ++++++++++++++++++
>  1 file changed, 173 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
> new file mode 100644
> index 000000000000..e96112bc15d0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
> @@ -0,0 +1,173 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/dac/adi,ad5754.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD5754 DAC device driver

Drop "device driver" unless "driver" and "device" are description of
hardware of some sort. Then please tell me what is this hardware? A
motor driver?

> +
> +maintainers:
> +  - Ciprian Regus <ciprian.regus@...log.com>
> +
> +description: |
> +  Bindings for the AD5754 and other chip variants digital-to-analog
> +  converters.
> +
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/AD5724_5734_5754.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad5722_5732_5752.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/ad5724r_5734r_5754r.pdf
> +  https://www.analog.com/media/en/technical-documentation/data-sheets/AD5722R_5732R_5752R.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad5722
> +      - adi,ad5732
> +      - adi,ad5752
> +      - adi,ad5724
> +      - adi,ad5734
> +      - adi,ad5754
> +      - adi,ad5722r
> +      - adi,ad5732r
> +      - adi,ad5752r
> +      - adi,ad5724r
> +      - adi,ad5734r
> +      - adi,ad5754r
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 30000000
> +
> +  spi-cpol: true
> +
> +  vref-supply:
> +    description:
> +      The regulator to use as an external reference. If this is not provided,
> +      the internal reference will be used for chips that have this feature.
> +      The external reference must be 2.5V.
> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +patternProperties:
> +  "^channel@([0-3])$":
> +    type: object
> +    description: Configurations for the DAC channels
> +
> +    properties:
> +      reg:
> +        description: Channel number
> +        maxItems: 1
> +
> +      output-range-microvolt:

Other such properties have vendor prefix. Did you receive feedback to
make it generic (without vendor prefix)?

> +        description: |
> +          Voltage range of a channel as <minimum, maximum>.
> +        oneOf:
> +          - items:
> +              - const: 0
> +              - enum: [5000000, 10000000, 10800000]
> +          - items:
> +              - const: -5000000
> +              - const: 5000000
> +          - items:
> +              - const: -10000000
> +              - const: 10000000
> +          - items:
> +              - const: -10800000
> +              - const: 10800000
> +
> +    required:
> +      - reg
> +      - output-range-microvolt
> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad5722
> +              - adi,ad5732
> +              - adi,ad5752
> +              - adi,ad5722r
> +              - adi,ad5732r
> +              - adi,ad5752r
> +    then:
> +      patternProperties:
> +        "^channel@([0-3])$":
> +          type: object
> +          properties:
> +            reg:
> +              description: Channel number
> +              enum: [0, 1]
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad5724
> +              - adi,ad5734
> +              - adi,ad5754
> +              - adi,ad5724r
> +              - adi,ad5734r
> +              - adi,ad5754r
> +    then:
> +      patternProperties:
> +        "^channel@([0-3])$":
> +          type: object
> +          properties:
> +            reg:
> +              description: Channel number
> +              enum: [0, 1, 2, 3]
> +
> +required:
> +  - compatible
> +  - reg
> +  - spi-max-frequency
> +  - spi-cpol
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +          status = "okay";
> +
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          dac@0 {

Messed up indentation. Use 4 spaces for entire example DTS.

> +              compatible = "adi,ad5754r";
> +              reg = <0>;
> +              spi-max-frequency = <1000000>;
> +              spi-cpol;
> +


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ