Devicetree
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: "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>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Joshua Crofts" <joshua.crofts1@gmail.com>,
	"Marek Vasut" <marex@nabladev.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 05/15] iio: adc: stm32-adc: rework internal channels data
Date: Tue, 13 Oct 2026 00:03:04 +0300	[thread overview]
Message-ID: <as1LCL3y2MN204OB@ashevche-desk.local> (raw)
In-Reply-To: <20261006-adc-stm32mp25-v1-v4-5-d31ec75aecf3@foss.st.com>

On Tue, Oct 06, 2026 at 09:57:36AM +0200, Fabrice Gasnier wrote:
> Diversity in internal channels data array lead to have zeroed data.
> To facilitate addition of new internal channels, without touching
> all array initializers, only focus on exiting channels on each
> supported ADC variant (e.g. each SoC).
> 
> This also allows to get rid of static_assert() checks.
> 
> No functional change intended.
> Cosmetic update: remove comma on STM32_ADC_INT_CH_NB as it should
> always be the last element.

...

> static int stm32_adc_populate_int_ch(struct iio_dev *indio_dev, const char *ch_n

>  	int i, ret;
>  
>  	for (i = 0; i < STM32_ADC_INT_CH_NB; i++) {
> -		if (!strncmp(stm32_adc_ic[i].name, ch_name, STM32_ADC_CH_SZ)) {
> +		if (!strncmp(stm32_adc_ic[i], ch_name, STM32_ADC_CH_SZ)) {

So, now this can be converted to use match_string() I believe. However, if you
are going to do that, it might be a separate patch. OTOH, this is not fix
anyway, so might be also integrated (but makes a huge change). Up to you.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-10-12 21:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  7:57 [PATCH v4 00/15] iio: adc: stm32: add support for stm32mp23 and stm32mp25 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 01/15] dt-bindings: iio: adc: stm32-adc: " Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 02/15] iio: adc: stm32-adc: core: manage clock prescaler diversity Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 03/15] iio: adc: stm32-adc: core: configurable number of interrupts Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 04/15] iio: adc: stm32-adc: manage characterization voltage diversity Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 05/15] iio: adc: stm32-adc: rework internal channels data Fabrice Gasnier
2026-10-12 21:03   ` Andy Shevchenko [this message]
2026-10-06  7:57 ` [PATCH v4 06/15] iio: adc: stm32-adc: add vreg enable option to manage diversity Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 07/15] iio: adc: stm32-adc: preferred style cleanup Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 08/15] iio: adc: stm32-adc: add support for stm32mp25 Fabrice Gasnier
2026-10-06  8:11   ` sashiko-bot
2026-10-06  7:57 ` [PATCH v4 09/15] iio: adc: stm32-adc: add support for stm32mp23 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 10/15] iio: adc: stm32-adc: add support for vddgpu on stm32mp23 and stm32mp25 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 11/15] arm64: dts: st: add vrefint calibration on stm32mp23 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 12/15] arm64: dts: st: add vrefint calibration on stm32mp25 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 13/15] arm64: dts: st: add ADC nodes on stm32mp231 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 14/15] arm64: dts: st: add ADC nodes on stm32mp251 Fabrice Gasnier
2026-10-06  7:57 ` [PATCH v4 15/15] arm64: dts: st: add ADC support on stm32mp257f-ev1 board Fabrice Gasnier
2026-10-12 21:07 ` [PATCH v4 00/15] iio: adc: stm32: add support for stm32mp23 and stm32mp25 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=as1LCL3y2MN204OB@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=jic23@kernel.org \
    --cc=joshua.crofts1@gmail.com \
    --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=linux-stm32@st-md-mailman.stormreply.com \
    --cc=marex@nabladev.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nuno.sa@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