From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Petar Stepanovic <pstepanovic@axiado.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Akhila Kavi" <akavi@axiado.com>,
"Prasad Bolisetty" <pbolisetty@axiado.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Harshit Shah" <hshah@axiado.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: adc: add Axiado SARADC driver
Date: Mon, 29 Jun 2026 09:05:27 +0300 [thread overview]
Message-ID: <akILJ0zG-g8rMzts@ashevche-desk.local> (raw)
In-Reply-To: <b06005e0-b7bc-4967-ac7b-cb170219f131@axiado.com>
On Mon, Jun 29, 2026 at 04:33:00AM +0200, Petar Stepanovic wrote:
...
> >> +static const struct iio_chan_spec axiado_saradc_iio_channels[] = {
> >> + AX_SARADC_CH(0, "adc0"), AX_SARADC_CH(1, "adc1"),
> >> + AX_SARADC_CH(2, "adc2"), AX_SARADC_CH(3, "adc3"),
> >> + AX_SARADC_CH(4, "adc4"), AX_SARADC_CH(5, "adc5"),
> >> + AX_SARADC_CH(6, "adc6"), AX_SARADC_CH(7, "adc7"),
> >> + AX_SARADC_CH(8, "adc8"), AX_SARADC_CH(9, "adc9"),
> >> + AX_SARADC_CH(10, "adc10"), AX_SARADC_CH(11, "adc11"),
> >> + AX_SARADC_CH(12, "adc12"), AX_SARADC_CH(13, "adc13"),
> >> + AX_SARADC_CH(14, "adc14"), AX_SARADC_CH(15, "adc15"),
> > Two columns looks a bit odd.
>
> I will also reformat the channel table to one entry per line.
I think with a new approach David proposed, 4 per line will be also acceptable.
> >> +};
...
> >> +static void axiado_saradc_disable(void *data)
> >> +{
> >> + struct axiado_saradc *info = data;
> >> +
> >> + writel(AX_SARADC_GLOBAL_CTRL_PD, info->regs + AX_SARADC_GLOBAL_CTRL_REG);
> > People usual make read and write wrappers or use regmap to avoid having
> > to write `info->regs + AX_SARADC_GLOBAL_CTRL_REG` so many times.
>
> My understanding is that simple read/write wrappers are not always
> preferred unless they provide additional value. Would switching the
> driver to regmap be acceptable here to avoid repeating the base address
> calculation?
This is the value of transition --> having that register base to be hidden and
not repeated all the times.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-29 6:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 7:47 [PATCH v3 0/2] iio: adc: Add Axiado SARADC driver Petar Stepanovic
2026-06-22 7:47 ` [PATCH v3 1/2] dt-bindings: iio: adc: add Axiado AX3000/AX3005 SARADC Petar Stepanovic
2026-06-22 7:47 ` [PATCH v3 2/2] iio: adc: add Axiado SARADC driver Petar Stepanovic
2026-06-22 9:55 ` Joshua Crofts
2026-06-23 8:30 ` Petar Stepanovic
2026-06-27 23:07 ` David Lechner
2026-06-29 2:33 ` Petar Stepanovic
2026-06-29 6:05 ` Andy Shevchenko [this message]
2026-06-29 14:54 ` David Lechner
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=akILJ0zG-g8rMzts@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=akavi@axiado.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=hshah@axiado.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pbolisetty@axiado.com \
--cc=pstepanovic@axiado.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