Re: [PATCH v5 16/17] ARM: dts: microchip: sama7d65: add temperature sensor

[email protected] Tue, 04 Aug 2026 13:10:58 +0000
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added generic-adc-thermal sensor node lacks a corresponding `thermal-zones` node, causing a guaranteed probe failure on boot.
--

--- Patch [16]: [PATCH v5 16/17] ARM: dts: microchip: sama7d65: add temperature sensor ---
commit 1087474b952d46f446e7e1f6bb9fb653933e7ada
Author: Varshini Rajendran <[email protected]>

ARM: dts: microchip: sama7d65: add temperature sensor

This commit adds a generic-adc-thermal temperature sensor node to the
SAMA7D65 device tree.

> diff --git a/arch/arm/boot/dts/microchip/sama7d65.dtsi b/arch/arm/boot/dts/microchip/sama7d65.dtsi
> --- a/arch/arm/boot/dts/microchip/sama7d65.dtsi
> +++ b/arch/arm/boot/dts/microchip/sama7d65.dtsi

[ ... ]

> @@ -119,6 +119,13 @@ pmu {
>  		interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
>  	};
>  
> +	thermal_sensor: thermal-sensor {
> +		compatible = "generic-adc-thermal";
> +		#thermal-sensor-cells = <0>;
> +		io-channels = <&adc AT91_SAMA7G5_ADC_TEMP_CHANNEL>;
> +		io-channel-names = "sensor-channel";
> +	};

[Severity: High]
Will this generic-adc-thermal node fail to probe during boot because a
corresponding thermal-zones node is missing from the device tree?

When gadc_thermal_probe() runs, it calls devm_thermal_of_zone_register(),
which relies on of_thermal_zone_find() to parse the device tree for a
thermal-zones node. 

Since this commit adds the sensor but omits the thermal-zones definition,
does this cause the lookup to unconditionally return -ENODEV and abort the
probe with a Thermal zone sensor register failed: -19 error log?

> +
>  	soc {
>  		compatible = "simple-bus";
>  		ranges;

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=16