From: Conor Dooley <conor@kernel.org>
To: Sayyad Abid <sayyad.abid16@gmail.com>
Cc: linux-iio@vger.kernel.org, jic23@kernel.org, lars@metafoo.de,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com,
javier.carrasco.cruz@gmail.com, olivier.moysan@foss.st.com,
gstols@baylibre.com, tgamblin@baylibre.com,
alisadariana@gmail.com, eblanc@baylibre.com,
antoniu.miclaus@analog.com, andriy.shevchenko@linux.intel.com,
stefan.popa@analog.com, ramona.gradinariu@analog.com,
herve.codina@bootlin.com, tobias.sperling@softing.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 5/5] dt-bindings: iio: adc: add bindings for TI ADS1262
Date: Thu, 1 May 2025 15:51:36 +0100 [thread overview]
Message-ID: <20250501-nervous-agreed-73b4b63c82e0@spud> (raw)
In-Reply-To: <20250501100043.325423-6-sayyad.abid16@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3102 bytes --]
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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-05-01 14:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 10:00 [RFC PATCH 0/5] iio: adc: Add initial support " Sayyad Abid
2025-05-01 10:00 ` [RFC PATCH 1/5] iio: adc: ti-ads1262.c: add initial driver for TI ADS1262 ADC Sayyad Abid
2025-05-01 17:37 ` David Lechner
2025-05-02 10:07 ` Andy Shevchenko
2025-05-04 16:20 ` Jonathan Cameron
2025-05-01 10:00 ` [RFC PATCH 2/5] iio: adc: Kconfig: add Kconfig entry for TI ADS1262 driver Sayyad Abid
2025-05-01 17:37 ` David Lechner
2025-05-04 15:55 ` Jonathan Cameron
2025-05-01 10:00 ` [RFC PATCH 3/5] iio: adc: Makefile: add compile support " Sayyad Abid
2025-05-01 10:00 ` [RFC PATCH 4/5] MAINTAINERS: add entry for TI ADS1262 ADC driver Sayyad Abid
2025-05-04 16:02 ` Jonathan Cameron
2025-05-01 10:00 ` [RFC PATCH 5/5] dt-bindings: iio: adc: add bindings for TI ADS1262 Sayyad Abid
2025-05-01 14:51 ` Conor Dooley [this message]
2025-05-01 17:37 ` David Lechner
2025-05-04 16:01 ` Jonathan Cameron
2025-05-01 18:20 ` [RFC PATCH 0/5] iio: adc: Add initial support " David Lechner
2025-05-02 9:52 ` Andy Shevchenko
2025-05-04 16:20 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250501-nervous-agreed-73b4b63c82e0@spud \
--to=conor@kernel.org \
--cc=alisadariana@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=eblanc@baylibre.com \
--cc=gstols@baylibre.com \
--cc=herve.codina@bootlin.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.com \
--cc=ramona.gradinariu@analog.com \
--cc=robh@kernel.org \
--cc=sayyad.abid16@gmail.com \
--cc=stefan.popa@analog.com \
--cc=tgamblin@baylibre.com \
--cc=tobias.sperling@softing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®