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: <20241015204916.GA1926571-robh@kernel.org>
Date: Tue, 15 Oct 2024 15:49:16 -0500
From: Rob Herring <robh@...nel.org>
To: Julien Stephan <jstephan@...libre.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Nuno Sá <nuno.sa@...log.com>,
	David Lechner <dlechner@...libre.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Jonathan Corbet <corbet@....net>, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH RFC 1/4] dt-bindings: iio: adc: ad7380: add adaq4370-4
 and adaq4380-4 compatible parts

On Tue, Oct 15, 2024 at 11:09:06AM +0200, Julien Stephan wrote:
> adaq4370-4 (2MSPS) and adaq4380-4 (4MSPS) are quad-channel precision data
> acquisition signal chain μModule solutions compatible with the ad738x
> family, with the following differences:
> 
> - configurable gain in front of each 4 adc
> - internal reference is 3V derived from refin-supply (5V)
> - additional supplies
> 
> To configure the gain a new patternProperties is added to describe each
> channel. It is restricted to adaq devices.
> 
> Signed-off-by: Julien Stephan <jstephan@...libre.com>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7380.yaml    | 117 +++++++++++++++++++++
>  1 file changed, 117 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
> index 74d82721637c..3007d8e39684 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
> @@ -25,6 +25,8 @@ description: |
>    * https://www.analog.com/en/products/ad7386-4.html
>    * https://www.analog.com/en/products/ad7387-4.html
>    * https://www.analog.com/en/products/ad7388-4.html
> +  * https://www.analog.com/en/products/adaq4370-4.html
> +  * https://www.analog.com/en/products/adaq4380-4.html
>  
>  
>  $ref: /schemas/spi/spi-peripheral-props.yaml#
> @@ -46,6 +48,8 @@ properties:
>        - adi,ad7386-4
>        - adi,ad7387-4
>        - adi,ad7388-4
> +      - adi,adaq4370-4
> +      - adi,adaq4380-4
>  
>    reg:
>      maxItems: 1
> @@ -59,6 +63,9 @@ properties:
>    vlogic-supply: true
>    refio-supply: true
>    refin-supply: true
> +  vs-p-supply: true
> +  vs-n-supply: true
> +  ldo-supply: true
>  
>    aina-supply:
>      description:
> @@ -86,12 +93,43 @@ properties:
>        specify the ALERT interrupt.
>      maxItems: 1
>  
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
>  required:
>    - compatible
>    - reg
>    - vcc-supply
>    - vlogic-supply
>  
> +patternProperties:
> +  "^channel@([0-3])$":
> +    $ref: adc.yaml
> +    type: object
> +
> +    properties:
> +      reg:
> +        description:
> +          The channel number. From 0 to 3 corresponding to channels A,B,C,D
> +        items:
> +          minimum: 0
> +          maximum: 3

This allows mutiple entries. Is that intended? If so, define the range 
(minItems/maxItems). If not, drop 'items'.

> +
> +      adi,gain-milli:
> +        description:
> +          The hardware gain applied to the ADC input (in milli units).
> +          If not present, default to 1000 (no actual gain applied).
> +        $ref: /schemas/types.yaml#/definitions/uint32

Elsewhere the same property is a uint16. Don't define different types 
for the same property name.


> +        default: 1000

Constraints? minimum/maximum/enum?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ