From: Jonathan Cameron <jic23@kernel.org>
To: Joseph Telaak <joseph@telaak.dev>
Cc: "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>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@analog.com, devicetree@vger.kernel.org
Subject: Re: [PATCH 5/5] iio: potentiometer: mcp4018: Add Analog Devices AD5246
Date: Thu, 19 Nov 2026 03:53:41 +0000 [thread overview]
Message-ID: <20261119035341.6b9486ac@jic23-hlaptop> (raw)
In-Reply-To: <20261116-iio-ad5246-v1-5-ef6b7c06d4b0@telaak.dev>
On Mon, 16 Nov 2026 17:59:54 -0500
Joseph Telaak <joseph@telaak.dev> wrote:
> The AD5246 is a 128-position digital rheostat with the same I2C
> interface as the MCP4017/18/19: a single data byte writes the 7-bit
> wiper and a single-byte read returns it, with no command byte. Add its
> four resistance options.
>
> Its resistance is D/128 of the end-to-end value, where the MCP401x's is
> D/127, so the scale divisor moves into the per-part config.
So which value can't we hit? 128 values gives 127 steps.
Sometimes with high bit rate things we ignore over that because it
makes no difference in practice given noise levels etc.
With only 7 bits it may be noticeable.
Ah, I checked the data sheet. Nominal Resistance +- 30% :)
Ah well, I don't really care if we resolve the rather theoretical
argument. So fine to follow the datasheet.
>
> The misc ad525x_dpot driver also knows the AD5246, by I2C id only and
> through its own sysfs files. It can't provide an IIO channel, which a
> consumer such as dpot-dac needs. The AD5272 is likewise in both drivers.
>
> Tested on an AD5246 at 0x2e that sets a fan's speed, described as
> adi,ad5246-010 with a vdd-supply. It probes, out_resistance0_raw_available
> reads [0 1 127] and out_resistance_scale reads 78.125000000. Raw writes
> of 0, 64, 100 and 127 read back the same value, and 128 is rejected.
> Writes through iio_write_channel_raw() from an in-kernel consumer of the
> channel read back as well (127, 38, 0 and 76).
>
> Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5246.pdf
> Signed-off-by: Joseph Telaak <joseph@telaak.dev>
Otherwise, I didn't have anything to add to existing reviews
Thanks,
Jonathan
prev parent reply other threads:[~2026-11-19 3:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 22:59 [PATCH 0/5] " Joseph Telaak
2026-11-16 22:59 ` [PATCH 1/5] iio: ABI: Move out_resistance_raw_available to sysfs-bus-iio Joseph Telaak
2026-11-17 8:10 ` Andy Shevchenko
2026-11-17 8:20 ` Joseph Telaak
2026-11-16 22:59 ` [PATCH 2/5] iio: potentiometer: mcp4018: Report the available wiper positions Joseph Telaak
2026-11-17 8:13 ` Andy Shevchenko
2026-11-17 19:35 ` Joseph Telaak
2026-11-16 22:59 ` [PATCH 3/5] dt-bindings: iio: potentiometer: Add Analog Devices AD5246 Joseph Telaak
2026-11-17 17:43 ` Conor Dooley
2026-11-17 20:04 ` Joseph Telaak
2026-11-18 18:07 ` Conor Dooley
2026-11-16 22:59 ` [PATCH 4/5] iio: potentiometer: mcp4018: Turn on the vdd supply Joseph Telaak
2026-11-17 8:16 ` Andy Shevchenko
2026-11-17 8:25 ` Joseph Telaak
2026-11-16 22:59 ` [PATCH 5/5] iio: potentiometer: mcp4018: Add Analog Devices AD5246 Joseph Telaak
2026-11-17 8:27 ` Andy Shevchenko
2026-11-17 19:31 ` Joseph Telaak
2026-11-19 3:45 ` Jonathan Cameron
2026-11-19 3:53 ` Jonathan Cameron [this message]
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=20261119035341.6b9486ac@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=joseph@telaak.dev \
--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®