public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] iio: dac: ad5504: Inquiry regarding voltage scale calculation
@ 2026-02-10 12:10 Taha Ed-Dafili
  2026-02-10 16:45 ` David Lechner
  0 siblings, 1 reply; 3+ messages in thread
From: Taha Ed-Dafili @ 2026-02-10 12:10 UTC (permalink / raw)
  To: linux-iio; +Cc: lars, Michael.Hennerich, jic23, dlechner, nuno.sa, andy

Greetings everyone,

I've been reviewing the ad5504 driver and comparing it with
the datasheet, and I want to verify my understanding of a potential
discrepancy.

Datasheet:

https://www.analog.com/media/en/technical-documentation/data-sheets/ad5504.pdf

The Issue:

The driver currently uses the vcc regulator voltage to calculate the
output scale. However, the datasheet (Rev B, Page 1) states the device has
an integrated precision reference. The output range (0-30V or 0-60V) is
determined by the R_SEL pin, not the supply voltage.

If my understanding is correct, using vcc for scaling is flawed.
For example, a 40V supply currently results in a ~9.7mV scale
(40V / 4096), whereas the hardware output (in 30V mode) is fixed
at ~7.32mV (30V / 4096).

My Questions:

1. Is it correct to replace the VCC-based scaling with fixed constants?
2. To support the 60V range, the driver needs to know the state of the
`R_SEL` pin. What is the preferred way to handle this hardware
configuration in the bindings?

If you can confirm this and provide guidance on the binding, I would
be happy to prepare a patch to address it.

Thanks,
Taha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-11 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 12:10 [RFC] iio: dac: ad5504: Inquiry regarding voltage scale calculation Taha Ed-Dafili
2026-02-10 16:45 ` David Lechner
2026-02-11 11:06   ` Taha Ed-Dafili

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox