Re: [PATCH v3 1/2] hwmon: (pmbus/core) Register the thermal sensors with a 0-based index
From: Guenter Roeck
Date: Sun Oct 25 2026 - 21:02:12 EST
On Thu, Oct 01, 2026 at 11:47:39PM +0200, Vincent Jardin wrote:
> From: Vincent Jardin <vjardin@xxxxxxx>
>
> Since commit
> 3aa74796cfd0 ("hwmon: (pmbus) Register with thermal for PSC_TEMPERATURE")
> pmbus_core registers each temperature input with the thermal core using
> its hwmon index as the sensor id. That index starts at 1, so temp1 is
> registered as sensor 1.
>
> The thermal core expects a 0-based id, which is what the hwmon core
> passes for the drivers that set HWMON_C_REGISTER_TZ:
> thermal_of matches a thermal-sensors phandle without cells as id 0, so a
> PMBus device with a single temperature input cannot
> use #thermal-sensor-cells = <0>.
>
> Cc: stable+noautosel@xxxxxxxxxx # changes the DT-visible sensor id, no in-tree user
> Fixes: 3aa74796cfd0 ("hwmon: (pmbus) Register with thermal for PSC_TEMPERATURE")
> Signed-off-by: Vincent Jardin <vjardin@xxxxxxx>
Applied.
Thanks,
Guenter