public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] iio: dac: ad5504: fix voltage scaling and add missing bindings
@ 2026-02-12 18:19 Taha Ed-Dafili
  2026-02-12 18:19 ` [PATCH v1 1/2] dt-bindings: iio: dac: ad5504: add output-range and missing gpios Taha Ed-Dafili
  2026-02-12 18:19 ` [PATCH v1 2/2] iio: dac: ad5504: use adi,output-range-volts for scale calculation Taha Ed-Dafili
  0 siblings, 2 replies; 11+ messages in thread
From: Taha Ed-Dafili @ 2026-02-12 18:19 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Michael Hennerich,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
	devicetree, linux-kernel, linux-mentees, me, skhan,
	Taha Ed-Dafili

This series fixes the voltage scale calculation for the AD5504 DAC and
updates the devicetree bindings to support the necessary hardware
configuration.

Previously, the driver calculated the scale based on the VCC supply
voltage.

However, as confirmed by the datasheet (Rev. B) and discussion on
the mailing list [1], the AD5504 has an integrated precision reference,
and the output range is determined strictly by the state of the
R_SEL pin (0-30V or 0-60V).

To address this:
1. Patch 1 adds `adi,output-range-volts` (and GPIO equivalents) to the
   bindings to describe the hardware state of the R_SEL pin, along with
   other missing properties (vlogic, clear, ldac).
2. Patch 2 updates the driver to use this property for scale calculation,
   falling back to the 60V range if unspecified, while retaining the VCC
   regulator enable for power.

Link: https://lore.kernel.org/linux-iio/20260210121032.4630-1-0rayn.dev@gmail.com/ [1]

Taha Ed-Dafili (2):
  dt-bindings: iio: dac: ad5504: add output-range and missing gpios
  iio: dac: ad5504: use adi,output-range-volts for scale calculation

 Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml | 20 ++++++++++++++++++++
 drivers/iio/dac/ad5504.c                                  | 15 ++++++++++-----
 2 files changed, 30 insertions(+), 5 deletions(-)

Taha Ed-Dafili (2):
  dt-bindings: iio: dac: ad5504: add output-range and missing gpios
  iio: dac: ad5504: use adi,output-range-volts for scale calculation

 .../bindings/iio/dac/adi,ad5504.yaml          | 38 +++++++++++++++++++
 drivers/iio/dac/ad5504.c                      | 26 ++++++++-----
 2 files changed, 54 insertions(+), 10 deletions(-)

-- 
2.47.3


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

end of thread, other threads:[~2026-02-16  7:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 18:19 [PATCH v1 0/2] iio: dac: ad5504: fix voltage scaling and add missing bindings Taha Ed-Dafili
2026-02-12 18:19 ` [PATCH v1 1/2] dt-bindings: iio: dac: ad5504: add output-range and missing gpios Taha Ed-Dafili
2026-02-13  8:11   ` Krzysztof Kozlowski
2026-02-13 17:05     ` Taha Ed-Dafili
2026-02-13 17:07       ` Krzysztof Kozlowski
2026-02-12 18:19 ` [PATCH v1 2/2] iio: dac: ad5504: use adi,output-range-volts for scale calculation Taha Ed-Dafili
2026-02-12 20:15   ` Andy Shevchenko
2026-02-13 17:05     ` Taha Ed-Dafili
2026-02-15 18:03       ` Jonathan Cameron
2026-02-15 18:05     ` Jonathan Cameron
2026-02-16  7:21       ` Andy Shevchenko

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