From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
To: Jonathan Cameron <jic23@kernel.org>, Andy Shevchenko <andy@kernel.org>
Cc: "Marek Vasut" <marex@nabladev.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
"Conor Dooley" <conor+dt@kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>
Subject: Re: [PATCH v2 05/14] iio: adc: stm32-adc: rework internal channels data
Date: Thu, 24 Sep 2026 12:02:49 +0200 [thread overview]
Message-ID: <d2fe0f9c-190c-4359-8a91-cebe8a95693e@foss.st.com> (raw)
In-Reply-To: <20260923-adc-stm32mp25-v1-v2-5-46bc019537c6@foss.st.com>
On 9/23/26 17:39, 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.
[ snip ]
> -static const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 };
> -static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp1) == STM32_ADC_INT_CH_NB);
> +static const unsigned int stm32_adc_min_ts_mp1[STM32_ADC_INT_CH_NB] = {
> + [STM32_ADC_INT_CH_VDDCORE] = 100,
> + [STM32_ADC_INT_CH_VREFINT] = 4300,
> + [STM32_ADC_INT_CH_VBAT] = 9800
> +};
Hi all,
Oops, I just figured out I've mixed changes with a fix here. So, I just
have sent a separate fix for that [1].
It's been noticed by sashiko [2].
I'll wait a bit before sending a V3, to leave time to review other patches.
>
> static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
> .regs = &stm32mp1_adc_regspec,
> @@ -2760,8 +2756,13 @@ static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
> .vref_charac_mv = 3300,
> };
>
> -static const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 };
> -static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp13) == STM32_ADC_INT_CH_NB);
> +static const unsigned int stm32_adc_min_ts_mp13[STM32_ADC_INT_CH_NB] = {
> + [STM32_ADC_INT_CH_VDDCORE] = 1000,
> + [STM32_ADC_INT_CH_VDDCPU] = 1000,
> + [STM32_ADC_INT_CH_VDDQ_DDR] = 1000,
> + [STM32_ADC_INT_CH_VREFINT] = 4300,
> + [STM32_ADC_INT_CH_VBAT] = 9800
> +};
Same here.
[1]
https://lore.kernel.org/linux-iio/20260924-adc-fix-sampling-v1-1-13814954d8d7@foss.st.com/
[2]
https://sashiko.dev/#/message/20260923155115.20E4E1F00893%40smtp.kernel.org
BR,
Fabrice
>
> static const struct stm32_adc_cfg stm32mp13_adc_cfg = {
> .regs = &stm32mp13_adc_regspec,
>
next prev parent reply other threads:[~2026-09-24 10:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 15:39 [PATCH v2 00/14] iio: adc: stm32: add support for stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 01/14] dt-bindings: iio: adc: stm32-adc: " Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 02/14] iio: adc: stm32-adc: core: manage clock prescaler diversity Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 03/14] iio: adc: stm32-adc: core: configurable number of interrupts Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 04/14] iio: adc: stm32-adc: manage characterization voltage diversity Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 05/14] iio: adc: stm32-adc: rework internal channels data Fabrice Gasnier
2026-09-24 10:02 ` Fabrice Gasnier [this message]
2026-09-23 15:39 ` [PATCH v2 06/14] iio: adc: stm32-adc: add vreg enable option to manage diversity Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 07/14] iio: adc: stm32-adc: add support for stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 08/14] iio: adc: stm32-adc: add support for stm32mp23 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 09/14] iio: adc: stm32: add support for vddgpu on stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 10/14] arm64: dts: st: add vrefint calibration on stm32mp23 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 11/14] arm64: dts: st: add vrefint calibration on stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 12/14] arm64: dts: st: add ADC nodes on stm32mp231 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 13/14] arm64: dts: st: add ADC nodes on stm32mp251 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 14/14] arm64: dts: st: add ADC support on stm32mp257f-ev1 board Fabrice Gasnier
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=d2fe0f9c-190c-4359-8a91-cebe8a95693e@foss.st.com \
--to=fabrice.gasnier@foss.st.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=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=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
all inboxes | Powered by JetHome®