Re: [PATCH] hwmon: (scmi) Enable temperature sensors using their sensor IDs
From: Guenter Roeck
Date: Mon Nov 09 2026 - 10:57:59 EST
On Mon, Nov 09, 2026 at 04:28:54PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@xxxxxxxxxxxxx>
>
> scmi_hwmon_probe() groups sensors by hwmon type, so the index in
> scmi_sensors->info[hwmon_temp] is not necessarily the SCMI sensor ID.
> Passing that index to config_set() targets a different sensor if the
> platform exposes non-temperature sensors ahead of temperature sensors.
> The intended temperature sensor can remain disabled, causing subsequent
> readings to fail. If configuring the wrong sensor fails, thermal
> registration of the intended sensor is also skipped.
>
> Use the firmware sensor ID, as the read and thermal registration paths
> already do, so temperature sensors are enabled correctly.
>
> The patch was reviewed and the commit message expanded with OpenCode
> AI assistance.
>
> Fixes: 72804d1631b3 ("hwmon: (scmi) Enable sensors to assure they can be read")
> Signed-off-by: Xu Rao <raoxu@xxxxxxxxxxxxx>
> Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxxxxx>
Applied.
Thanks,
Guenter