mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Telaak <joseph@telaak.dev>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Peter Rosin" <peda@lysator.liu.se>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Joseph Telaak" <joseph@telaak.dev>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux@analog.com, devicetree@vger.kernel.org,
	 Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v2 3/6] dt-bindings: iio: potentiometer: Add Analog Devices AD5246
Date: Wed, 25 Nov 2026 15:22:30 -0500	[thread overview]
Message-ID: <20261125-iio-ad5246-v2-3-8feeb630f0b6@telaak.dev> (raw)
In-Reply-To: <20261125-iio-ad5246-v2-0-8feeb630f0b6@telaak.dev>

The AD5246 is a 128-position digital rheostat on I2C, in 5, 10, 50 and
100 kOhm versions. The end-to-end resistance sets the scale the driver
reports and cannot be read from the device, so each version gets its own
compatible, named in kOhm as for the AD5272, with no fallback between
them. There is no fallback to the MCP4017 compatibles either: the
AD5246's step is 1/128 of the end-to-end value, not 1/127. It uses the
same protocol as the MCP4017/18/19 and the mcp4018 driver supports it,
so list the binding with that driver in MAINTAINERS.

It gets its own binding rather than a trivial-devices entry so that it
can describe its supply and be an IIO channel provider
(#io-channel-cells) for a consumer such as dpot-dac.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Joseph Telaak <joseph@telaak.dev>
---
 .../bindings/iio/potentiometer/adi,ad5246-005.yaml | 54 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 55 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5246-005.yaml b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5246-005.yaml
new file mode 100644
index 000000000000..9215de612a08
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5246-005.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/potentiometer/adi,ad5246-005.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5246 digital rheostat
+
+maintainers:
+  - Joseph Telaak <joseph@telaak.dev>
+
+description: |
+  128-position digital rheostat with an I2C interface. The compatible
+  names the end-to-end resistance in kOhm.
+
+  Datasheet: https://www.analog.com/en/products/ad5246.html
+
+properties:
+  compatible:
+    enum:
+      - adi,ad5246-005
+      - adi,ad5246-010
+      - adi,ad5246-050
+      - adi,ad5246-100
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+  "#io-channel-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        potentiometer@2e {
+            compatible = "adi,ad5246-010";
+            reg = <0x2e>;
+            vdd-supply = <&reg_3v3>;
+            #io-channel-cells = <0>;
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index ef6033c5edf3..b680f922d9bf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16691,6 +16691,7 @@ MCP4018 AND MCP4531 MICROCHIP DIGITAL POTENTIOMETER DRIVERS
 M:	Peter Rosin <peda@lysator.liu.se>
 L:	linux-iio@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/iio/potentiometer/adi,ad5246-005.yaml
 F:	drivers/iio/potentiometer/mcp4018.c
 F:	drivers/iio/potentiometer/mcp4531.c
 

-- 
Git-155)


  parent reply	other threads:[~2026-11-25 20:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 20:22 [PATCH v2 0/6] iio: potentiometer: mcp4018: " Joseph Telaak
2026-11-25 20:22 ` [PATCH v2 1/6] iio: ABI: Move out_resistance_raw_available to sysfs-bus-iio Joseph Telaak
2026-11-25 23:37   ` Jonathan Cameron
2026-11-25 20:22 ` [PATCH v2 2/6] iio: potentiometer: mcp4018: Report the available wiper positions Joseph Telaak
2026-11-25 20:22 ` Joseph Telaak [this message]
2026-11-25 20:22 ` [PATCH v2 4/6] iio: potentiometer: mcp4018: Turn on the vdd supply Joseph Telaak
2026-11-25 20:22 ` [PATCH v2 5/6] iio: potentiometer: mcp4018: Move the scale divisor into the per-part config Joseph Telaak
2026-11-25 20:22 ` [PATCH v2 6/6] iio: potentiometer: mcp4018: Add Analog Devices AD5246 Joseph Telaak
2026-11-25 23:46   ` Jonathan Cameron
2026-11-26  1:29 ` [PATCH v2 0/6] " 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=20261125-iio-ad5246-v2-3-8feeb630f0b6@telaak.dev \
    --to=joseph@telaak.dev \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=peda@lysator.liu.se \
    --cc=robh@kernel.org \
    /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®