Re: [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name

From: Konrad Dybcio

Date: Mon Jun 29 2026 - 07:33:25 EST


On 6/29/26 11:16 AM, Anvesh Jain P wrote:
> Each fan is registered as a thermal cooling device using
> devm_thermal_of_cooling_device_register(). When the thermal core gained
> cooling device ID support, the helper's prototype changed: its second
> argument became a 'u32 cdev_id' and its third a 'const char *type',
> replacing the previous 'struct device_node *np'.
>
> The resulting semantic conflict between the EC driver and the reworked
> thermal helper was resolved while merging the drivers-x86 tree into
> linux-next by passing NULL as the 'type' argument, dropping the per-fan
> 'name' string. As a result every fan is registered as a cooling device
> with an empty name.
>
> Pass 'name' as the 'type' argument so the cooling devices are registered
> with their intended "qcom_ec_fan_<n>" names.
>
> Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices")
> Signed-off-by: Anvesh Jain P <anvesh.p@xxxxxxxxxxxxxxxx>
> ---
> drivers/platform/arm64/qcom-hamoa-ec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/arm64/qcom-hamoa-ec.c b/drivers/platform/arm64/qcom-hamoa-ec.c
> index 45829f2786b7..12196d56b60e 100644
> --- a/drivers/platform/arm64/qcom-hamoa-ec.c
> +++ b/drivers/platform/arm64/qcom-hamoa-ec.c
> @@ -391,7 +391,7 @@ static int qcom_ec_probe(struct i2c_client *client)
> ec_cdev->fan_id = i + 1;
> ec_cdev->parent_dev = dev;
>
> - ec_cdev->cdev = devm_thermal_of_cooling_device_register(dev, 0, NULL, ec_cdev,

This seems to have been altered to use:

devm_thermal_of_child_cooling_device_register()

apparently as part of:

f31c00c377cc ("Merge tag 'platform-drivers-x86-v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86")

Konrad