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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250501-nervous-agreed-73b4b63c82e0@spud>
Date: Thu, 1 May 2025 15:51:36 +0100
From: Conor Dooley <conor@...nel.org>
To: Sayyad Abid <sayyad.abid16@...il.com>
Cc: linux-iio@...r.kernel.org, jic23@...nel.org, lars@...afoo.de,
	robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
	dlechner@...libre.com, nuno.sa@...log.com,
	javier.carrasco.cruz@...il.com, olivier.moysan@...s.st.com,
	gstols@...libre.com, tgamblin@...libre.com, alisadariana@...il.com,
	eblanc@...libre.com, antoniu.miclaus@...log.com,
	andriy.shevchenko@...ux.intel.com, stefan.popa@...log.com,
	ramona.gradinariu@...log.com, herve.codina@...tlin.com,
	tobias.sperling@...ting.com, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 5/5] dt-bindings: iio: adc: add bindings for TI
 ADS1262

On Thu, May 01, 2025 at 03:30:43PM +0530, Sayyad Abid wrote:

> +properties:
> +  compatible:
> +    enum:
> +      - ti,ads1262

How different is the ads1263? Do we get support for both "for free"?

> +  spi-cpha:
> +    type: boolean
> +    description: Required for SPI mode 1 operation

This should just collapse to "spi-cpha: true", cos the definition of it
comes from spi-peripheral-props.yaml.

> +
> +  reset-gpios:
> +    maxItems: 1
> +    description: GPIO specifier for the reset pin (active low)
> +
> +  vref-supply:
> +    description: |
> +      The regulator supply for ADC reference voltage. If not specified,
> +      the internal 2.5V reference will be used.

I looked this device up, I don't see an input pin called "vref" and
there appear to be multiple reference inputs. All supplies should be
documented.

> +      ti,gain:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        minimum: 0
> +        maximum: 5
> +        description: |
> +          PGA gain setting. Not applicable for temperature sensor (channel 11).
> +          0: 1 (default)
> +          1: 2
> +          2: 4
> +          3: 8
> +          4: 16
> +          5: 32

Why can't the gain be in it's actual unit, rather than what I am
guessing is a register value?

> +  ti,data-rate:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 0
> +    maximum: 15
> +    description: |
> +      Data acquisition rate in samples per second
> +      0: 2.5
> +      1: 5
> +      2: 10
> +      3: 16.6
> +      4: 20
> +      5: 50
> +      6: 60
> +      7: 100
> +      8: 400
> +      9: 1200
> +      10: 2400
> +      11: 4800
> +      12: 7200
> +      13: 14400
> +      14: 19200
> +      15: 38400

Same applies here really, except that the fractional per second rate
would only work if the base unit was samples-per-<something sub second>,
which might or might not be worth it.

> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      ads1262: adc@0 {

The label here is unused AFAICT and should be dropped.

Cheers,
Conor.

> +        compatible = "ti,ads1262";
> +        reg = <0>;
> +        spi-max-frequency = <7372800>;
> +        vref-supply = <&adc_vref>;
> +        spi-cpha;
> +        reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
> +        ti,pga-bypass;
> +        ti,data-rate = <15>; /* 38400 SPS */
> +
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        #io-channel-cells = <1>;
> +
> +        /* Single-ended channel */
> +        channel@0 {
> +          reg = <0>;
> +        };
> +
> +        /* Differential channel */
> +        channel@1 {
> +          reg = <1>;
> +          diff-channels = <1 2>;
> +          ti,gain = <2>; /* Gain of 4 */
> +        };
> +
> +        /* Temperature sensor */
> +        channel@11 {
> +          reg = <11>;
> +        };
> +      };
> +    };
> +...
> -- 
> 2.39.5
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ