From: Joshua Crofts <joshua.crofts1@gmail.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>,
"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,
"Olivier Moysan" <olivier.moysan@foss.st.com>
Subject: Re: [PATCH v3 04/15] iio: adc: stm32-adc: manage characterization voltage diversity
Date: Wed, 30 Sep 2026 16:54:47 +0200 [thread overview]
Message-ID: <20260930165447.000046e4@gmail.com> (raw)
In-Reply-To: <20260930-adc-stm32mp25-v1-v3-4-406834430d72@foss.st.com>
On Wed, 30 Sep 2026 16:18:25 +0200
Fabrice Gasnier <fabrice.gasnier@foss.st.com> wrote:
> From: Olivier Moysan <olivier.moysan@foss.st.com>
>
> The characterization voltage used to calibrate vrefint depends
> on SoC family. Add vref_charac_mv field in stm32_adc_cfg structure
> to store the characterization voltage for each SoC, and use it
> in Vref computation formula.
>
> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> ---
> Changes in v2:
> - Andy's review comments: rename variable to vref_charac_mv (unit suffix).
> Drop the const attribute.
> ---
> drivers/iio/adc/stm32-adc.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index 600f975f1d7b..fa46803d54be 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
> @@ -43,7 +43,6 @@
> #define STM32_ADC_TIMEOUT_US 100000
> #define STM32_ADC_TIMEOUT (msecs_to_jiffies(STM32_ADC_TIMEOUT_US / 1000))
> #define STM32_ADC_HW_STOP_DELAY_MS 100
> -#define STM32_ADC_VREFINT_VOLTAGE 3300
>
> #define STM32_DMA_BUFFER_SIZE PAGE_SIZE
>
> @@ -211,6 +210,7 @@ struct stm32_adc;
> * @set_ovs: routine to set oversampling configuration
> * @smp_cycles: programmable sampling time (ADC clock cycles)
> * @ts_int_ch: pointer to array of internal channels minimum sampling time in ns
> + * @vref_charac_mv: Vref characterization voltage used to measure vrefint calibration value
> */
> struct stm32_adc_cfg {
> const struct stm32_adc_regspec *regs;
> @@ -230,6 +230,7 @@ struct stm32_adc_cfg {
> void (*set_ovs)(struct iio_dev *indio_dev, u32 ovs_idx);
> const unsigned int *smp_cycles;
> const unsigned int *ts_int_ch;
> + int vref_charac_mv;
Case-sensitive units if it's SI is preferred in IIO, therefore *_mV.
(checkpatch warns against this, but just ignore it).
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-09-30 14:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:18 [PATCH v3 00/15] iio: adc: stm32: add support for stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 01/15] dt-bindings: iio: adc: stm32-adc: " Fabrice Gasnier
2026-09-30 21:18 ` Conor Dooley
2026-09-30 14:18 ` [PATCH v3 02/15] iio: adc: stm32-adc: core: manage clock prescaler diversity Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 03/15] iio: adc: stm32-adc: core: configurable number of interrupts Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 04/15] iio: adc: stm32-adc: manage characterization voltage diversity Fabrice Gasnier
2026-09-30 14:54 ` Joshua Crofts [this message]
2026-09-30 14:18 ` [PATCH v3 05/15] iio: adc: stm32-adc: rework internal channels data Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 06/15] iio: adc: stm32-adc: add vreg enable option to manage diversity Fabrice Gasnier
2026-09-30 15:01 ` Joshua Crofts
2026-09-30 14:18 ` [PATCH v3 07/15] iio: adc: stm32-adc: preferred style cleanup Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 08/15] iio: adc: stm32-adc: add support for stm32mp25 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 09/15] iio: adc: stm32-adc: add support for stm32mp23 Fabrice Gasnier
2026-09-30 15:12 ` Joshua Crofts
2026-09-30 14:18 ` [PATCH v3 10/15] iio: adc: stm32-adc: add support for vddgpu on stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 11/15] arm64: dts: st: add vrefint calibration on stm32mp23 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 12/15] arm64: dts: st: add vrefint calibration on stm32mp25 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 13/15] arm64: dts: st: add ADC nodes on stm32mp231 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 14/15] arm64: dts: st: add ADC nodes on stm32mp251 Fabrice Gasnier
2026-09-30 14:18 ` [PATCH v3 15/15] 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=20260930165447.000046e4@gmail.com \
--to=joshua.crofts1@gmail.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=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=olivier.moysan@foss.st.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®