From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Paller, Kim Seer" <KimSeer.Paller@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
"Sa, Nuno" <Nuno.Sa@analog.com>,
Andy Shevchenko <andy@kernel.org>,
"Hennerich, Michael" <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-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux <linux@analog.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] iio: dac: ad3530r: Add support for AD3532R/AD3532
Date: Thu, 25 Jun 2026 17:22:50 +0300 [thread overview]
Message-ID: <aj05uiprjLOFzzvx@ashevche-desk.local> (raw)
In-Reply-To: <PH0PR03MB7141524D6546CD0FF1EF43FAF9EC2@PH0PR03MB7141.namprd03.prod.outlook.com>
On Thu, Jun 25, 2026 at 10:07:47AM +0000, Paller, Kim Seer wrote:
> > From: Jonathan Cameron <jic23@kernel.org>
> > Sent: Monday, June 22, 2026 12:46 AM
> > On Mon, 15 Jun 2026 13:05:44 +0300
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > On Mon, Jun 15, 2026 at 02:20:18PM +0800, Kim Seer Paller wrote:
...
> > > > +#define AD3532R_MAX_REG_ADDR 0x30F9
> > Whilst we are here, Sashiko thinks there is an off by one on that value as it's
> > the lower of the two registers that make up channel 15.
> > https://urldefense.com/v3/__https://sashiko.dev/*/patchset/20260615-iio-
> > ad3532r-support-v2-0-
> > 84a0af8b83fa*40analog.com__;IyU!!A3Ni8CS0y2Y!88afCOStwucx32wuoeR
> > SyZ9GpkZge9YDw5_PIMAf7SLs3OLykUC_qNRDUCnRw7wTwsxiIT1V-
> > R8sH17sTg$
> > It also suggests an existing bug that it would be good to look into.
>
> I don't think it's off-by-one. INPUT_CHn registers are listed by LSB, so
> channel 15 is 0x30F8 (LSB) / 0x30F9 (MSB). The driver addresses the MSB and
> the part defaults to descending mode, so the access goes 0x30F9 -> 0x30F8.
> 0x30F9 is also the highest valid address per the datasheet, so max_register
> looks correct same for AD3530R's 0xF9. Does that match our understanding, or
> am I missing a case?
If it's the value for .max_register in regmap configuration, then it's fine.
> > > Hmm... I dunno if it's better to sort by values (so the "bank" 0 goes
> > > together followed by "bank" 1). Jonathan, what's your preference here?
> > Nuno, David?
> > That is how people will typically check them vs the datasheet so I agree with
> > numeric order. Maybe with a comment at the top about there effectively
> > being two banks. Many of the registers are effectively copies for the new
> > channels but not all of them, so a macro approach would probably be even
> > more confusing.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-25 14:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 6:20 [PATCH v2 0/4] Add support for AD3532R/AD3532 Kim Seer Paller
2026-06-15 6:20 ` [PATCH v2 1/4] iio: dac: ad3530r: Refactor setup to table-driven register bank approach Kim Seer Paller
2026-06-15 6:30 ` sashiko-bot
2026-06-15 7:22 ` Joshua Crofts
2026-06-15 10:08 ` Andy Shevchenko
2026-06-26 8:44 ` Paller, Kim Seer
2026-06-26 10:12 ` Andy Shevchenko
2026-06-21 16:49 ` Jonathan Cameron
2026-06-15 6:20 ` [PATCH v2 2/4] iio: ABI: add DAC 10kohm_to_gnd powerdown mode Kim Seer Paller
2026-06-15 6:32 ` sashiko-bot
2026-06-15 6:20 ` [PATCH v2 3/4] dt-bindings: iio: dac: add support for AD3532R/AD3532 Kim Seer Paller
2026-06-15 6:33 ` sashiko-bot
2026-06-15 6:20 ` [PATCH v2 4/4] iio: dac: ad3530r: Add " Kim Seer Paller
2026-06-15 6:33 ` sashiko-bot
2026-06-15 10:05 ` Andy Shevchenko
2026-06-21 16:45 ` Jonathan Cameron
2026-06-25 10:07 ` Paller, Kim Seer
2026-06-25 14:22 ` Andy Shevchenko [this message]
2026-06-25 10:06 ` Paller, Kim Seer
2026-06-26 10:11 ` Andy Shevchenko
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=aj05uiprjLOFzzvx@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=KimSeer.Paller@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=Nuno.Sa@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--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=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