All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gerard Marull-Paretas" <gerard@teslabs.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2] dt-bindings: iio: adc: st,stm32-adc: add temperature sensor calibration cells
Date: Thu, 03 Dec 2026 17:52:45 +0000	[thread overview]
Message-ID: <sashiko-outbox-248310@kernel.org> (raw)
In-Reply-To: <20261203165214.54424-1-gerard@teslabs.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: iio: stm32-adc: nvmem-cells schema allows partial
  ts-cal1
- [Low] dt-bindings: st,stm32-adc: missing reserved label for internal
  temp channel
--

commit 4db5e46c3a856f2f8d4973c119c1d93502ec2b26
Author: Gerard Marull-Paretas <gerard@teslabs.com>

dt-bindings: iio: adc: st,stm32-adc: add temperature sensor calibration cells

This commit extends the nvmem-cells and nvmem-cell-names properties in the
STM32 ADC binding to accept ts-cal1 and ts-cal2 temperature sensor
calibration cells alongside vrefint.

> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> index c4c4575d3fa96..9fe41b89982e9 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
> @@ -337,12 +337,22 @@ patternProperties:
>          deprecated: true
>  
>        nvmem-cells:
> +        minItems: 1
>          items:
>            - description: Phandle to the calibration vrefint data provided by otp
> +          - description:
> +              Temperature sensor calibration data at the first calibration
> +              temperature (TS_CAL1)
> +          - description:
> +              Temperature sensor calibration data at the second calibration
> +              temperature (TS_CAL2)
>  
>        nvmem-cell-names:
> +        minItems: 1
>          items:
>            - const: vrefint
> +          - const: ts-cal1
> +          - const: ts-cal2

[Severity: Low]
Does setting minItems: 1 on a 3-entry positional items list accept an
incomplete [vrefint, ts-cal1] pair without ts-cal2?

It also forces vrefint to index 0, rejecting an ADC node that provides only
ts-cal1 and ts-cal2 (arch/arm/boot/dts/st/stm32f429.dtsi defines only
ts_cal1 and ts_cal2 in its romem node).  Using oneOf to allow vrefint alone,
ts-cal1 and ts-cal2 together, or all three cells would handle both cases.

>  
>      patternProperties:
>        "^channel@([0-9]|1[0-9])$":

[Severity: Low]
Should this binding also define a reserved channel label for the internal
temperature sensor?

Other internal ADC channels (vddcore, vddcpu, vddq_ddr, vrefint, and vbat)
are identified by reserved label names under channel@N, which
stm32_adc_populate_int_ch() in drivers/iio/adc/stm32-adc.c matches to bind
their calibration cells.

Because compatible and reg do not uniquely identify the temperature sensor
channel across STM32 SoCs, omitting a reserved label leaves the binding
incomplete.  In-tree STM32MP15 boards already diverge on ad-hoc names such
as internal_temp and sense_temp.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203165214.54424-1-gerard@teslabs.com?part=1

      reply	other threads:[~2026-12-03 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:52 [PATCH v2] dt-bindings: iio: adc: st,stm32-adc: add temperature sensor calibration cells Gerard Marull-Paretas
2026-12-03 17:52 ` sashiko-bot [this message]

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=sashiko-outbox-248310@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gerard@teslabs.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.