From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Herve Codina (Schneider Electric)" <herve.codina@bootlin.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"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>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Pascal Eberhard <pascal.eberhard@se.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 2/4] iio: adc: Add support for the Renesas RZ/N1 ADC
Date: Mon, 03 Nov 2025 11:34:35 +0000 [thread overview]
Message-ID: <20e485b69419ffd518c7aeb16881df429b0a4873.camel@gmail.com> (raw)
In-Reply-To: <20251029144644.667561-3-herve.codina@bootlin.com>
On Wed, 2025-10-29 at 15:46 +0100, Herve Codina (Schneider Electric) wrote:
> The Renesas RZ/N1 ADC controller is the ADC controller available in the
> Renesas RZ/N1 SoCs family. It can use up to two internal ADC cores (ADC1
> and ADC2) those internal cores are not directly accessed but are handled
> through ADC controller virtual channels.
>
> Signed-off-by: Herve Codina (Schneider Electric) <herve.codina@bootlin.com>
> ---
Not much to add to Andy's review. Looks in good shape... Just one small remark
from me. With it and Andy's stuff addressed:
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/adc/Kconfig | 10 +
> drivers/iio/adc/Makefile | 1 +
> drivers/iio/adc/rzn1-adc.c | 493 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 504 insertions(+)
> create mode 100644 drivers/iio/adc/rzn1-adc.c
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 58a14e6833f6..113f6a5c9745 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -1403,6 +1403,16 @@ config RZG2L_ADC
> To compile this driver as a module, choose M here: the
> module will be called rzg2l_adc.
>
> +config RZN1_ADC
> + tristate "Renesas RZ/N1 ADC driver"
> + depends on ARCH_RZN1 || COMPILE_TEST
> + help
> + Say yes here to build support for the ADC found in Renesas
> + RZ/N1 family.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called rzn1-adc.
> +
> config SC27XX_ADC
> tristate "Spreadtrum SC27xx series PMICs ADC"
> depends on MFD_SC27XX_PMIC || COMPILE_TEST
> diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
> index d008f78dc010..ba7a8a63d070 100644
> --- a/drivers/iio/adc/Makefile
> +++ b/drivers/iio/adc/Makefile
> @@ -123,6 +123,7 @@ obj-$(CONFIG_ROHM_BD79112) += rohm-bd79112.o
> obj-$(CONFIG_ROHM_BD79124) += rohm-bd79124.o
> obj-$(CONFIG_ROCKCHIP_SARADC) += rockchip_saradc.o
> obj-$(CONFIG_RZG2L_ADC) += rzg2l_adc.o
> +obj-$(CONFIG_RZN1_ADC) += rzn1-adc.o
> obj-$(CONFIG_SC27XX_ADC) += sc27xx_adc.o
> obj-$(CONFIG_SD_ADC_MODULATOR) += sd_adc_modulator.o
> obj-$(CONFIG_SOPHGO_CV1800B_ADC) += sophgo-cv1800b-adc.o
> diff --git a/drivers/iio/adc/rzn1-adc.c b/drivers/iio/adc/rzn1-adc.c
> new file mode 100644
> index 000000000000..52ec13adddef
> --- /dev/null
> +++ b/drivers/iio/adc/rzn1-adc.c
> @@ -0,0 +1,493 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Renesas RZ/N1 ADC driver
> + *
> + * Copyright (C) 2025 Schneider-Electric
> + *
> + * Author: Herve Codina <herve.codina@bootlin.com>
> + *
> + * The RZ/N1 ADC controller can handle channels from its internal ADC1 and/or
> + * ADC2 cores. The driver use ADC1 and/or ADC2 cores depending on the presence
> + * of the related power supplies (AVDD and VREF) description in the device-tree.
> + */
...
>
> +
> + platform_set_drvdata(pdev, indio_dev);
> +
If I'm not missing nothing, there's no real need to pass in indio_dev. So, why not
passing rzn1_adc directly and avoid the pointer arithmetic's in the pm callbacks?
- Nuno Sá
next prev parent reply other threads:[~2025-11-03 11:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 14:46 [PATCH v2 0/4] Add support for the Renesas RZ/N1 ADC Herve Codina (Schneider Electric)
2025-10-29 14:46 ` [PATCH v2 1/4] dt-bindings: iio: adc: Add " Herve Codina (Schneider Electric)
2025-10-30 18:02 ` Rob Herring (Arm)
2025-10-29 14:46 ` [PATCH v2 2/4] iio: adc: Add support for " Herve Codina (Schneider Electric)
2025-10-30 9:00 ` Andy Shevchenko
2025-11-02 11:42 ` Jonathan Cameron
2025-11-03 8:40 ` Herve Codina
2025-11-03 9:39 ` Andy Shevchenko
2025-11-03 11:34 ` Nuno Sá [this message]
2025-10-29 14:46 ` [PATCH v2 3/4] ARM: dts: renesas: r9a06g032: Add the ADC device Herve Codina (Schneider Electric)
2025-10-29 14:46 ` [PATCH v2 4/4] MAINTAINERS: Add the Renesas RZ/N1 ADC driver entry Herve Codina (Schneider Electric)
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=20e485b69419ffd518c7aeb16881df429b0a4873.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=geert+renesas@glider.be \
--cc=herve.codina@bootlin.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=nuno.sa@analog.com \
--cc=pascal.eberhard@se.com \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wsa+renesas@sang-engineering.com \
/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