From: David Lechner <dlechner@baylibre.com>
To: "Petar Stepanovic" <pstepanovic@axiado.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>
Cc: 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: Sat, 27 Jun 2026 18:07:49 -0500 [thread overview]
Message-ID: <6770a7af-06cc-4240-9b20-c299e7080ab1@baylibre.com> (raw)
In-Reply-To: <20260622-axiado-ax3000-ax3005-saradc-v3-2-e57c7c7ae675@axiado.com>
On 6/22/26 2:47 AM, Petar Stepanovic wrote:
> Add support for the SARADC controller found on Axiado AX3000 and
> AX3005 SoCs.
>
...
> +#define AX_SARADC_CH(_index, _id) \
> + { \
> + .type = IIO_VOLTAGE, \
> + .indexed = 1, \
> + .channel = (_index), \
> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
> + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
> + .datasheet_name = (_id), \
This could probably be:
.datasheet_name = "adc" #_index,
and avoid the need for _id.
> + }
> +
> +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.
> +};
> +
> +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.
> +}
next prev parent reply other threads:[~2026-06-27 23:08 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 [this message]
2026-06-29 2:33 ` Petar Stepanovic
2026-06-29 6:05 ` Andy Shevchenko
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=6770a7af-06cc-4240-9b20-c299e7080ab1@baylibre.com \
--to=dlechner@baylibre.com \
--cc=akavi@axiado.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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