* [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name
@ 2026-06-29 9:16 Anvesh Jain P
2026-06-29 11:21 ` Konrad Dybcio
2026-06-29 12:33 ` Ilpo Järvinen
0 siblings, 2 replies; 5+ messages in thread
From: Anvesh Jain P @ 2026-06-29 9:16 UTC (permalink / raw)
To: Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Konrad Dybcio, Dmitry Baryshkov,
Maya Matuszczyk
Cc: linux-arm-msm, platform-driver-x86, linux-kernel, Anvesh Jain P
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@oss.qualcomm.com>
---
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,
+ ec_cdev->cdev = devm_thermal_of_cooling_device_register(dev, 0, name, ec_cdev,
&qcom_ec_thermal_ops);
if (IS_ERR(ec_cdev->cdev)) {
return dev_err_probe(dev, PTR_ERR(ec_cdev->cdev),
---
base-commit: 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
change-id: 20260629-fix_cooling_device_register-cca038ff50c4
Best regards,
--
Anvesh Jain P <anvesh.p@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name
2026-06-29 9:16 [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name Anvesh Jain P
@ 2026-06-29 11:21 ` Konrad Dybcio
2026-06-29 14:08 ` Anvesh Jain P
2026-06-29 12:33 ` Ilpo Järvinen
1 sibling, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2026-06-29 11:21 UTC (permalink / raw)
To: Anvesh Jain P, Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Dmitry Baryshkov, Maya Matuszczyk
Cc: linux-arm-msm, platform-driver-x86, linux-kernel
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@oss.qualcomm.com>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name
2026-06-29 11:21 ` Konrad Dybcio
@ 2026-06-29 14:08 ` Anvesh Jain P
0 siblings, 0 replies; 5+ messages in thread
From: Anvesh Jain P @ 2026-06-29 14:08 UTC (permalink / raw)
To: Konrad Dybcio, Sibi Sankar, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Dmitry Baryshkov, Maya Matuszczyk
Cc: linux-arm-msm, platform-driver-x86, linux-kernel
On 6/29/2026 4:51 PM, Konrad Dybcio wrote:
> 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@oss.qualcomm.com>
>> ---
>> 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
You're right, thanks. That merge switched to
devm_thermal_of_child_cooling_device_register(dev, NULL, name, ...),
which already passes 'name'. The issue no longer exists in current
linux-next, so I'll drop this patch.
--
Best Regards,
Anvesh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name
2026-06-29 9:16 [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name Anvesh Jain P
2026-06-29 11:21 ` Konrad Dybcio
@ 2026-06-29 12:33 ` Ilpo Järvinen
2026-06-30 5:30 ` Anvesh Jain P
1 sibling, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2026-06-29 12:33 UTC (permalink / raw)
To: Anvesh Jain P
Cc: Sibi Sankar, Hans de Goede, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov, Maya Matuszczyk, linux-arm-msm,
platform-driver-x86, LKML
On Mon, 29 Jun 2026, 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@oss.qualcomm.com>
> ---
> 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,
> + ec_cdev->cdev = devm_thermal_of_cooling_device_register(dev, 0, name, ec_cdev,
> &qcom_ec_thermal_ops);
> if (IS_ERR(ec_cdev->cdev)) {
> return dev_err_probe(dev, PTR_ERR(ec_cdev->cdev),
>
> ---
> base-commit: 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
$ git log 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
fatal: bad object 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
Please don't base your submissions on some random commits. There has never
been code with (dev, 0, NULL, ...) in platforms drivers tree (and neither
in Linus' tree).
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name
2026-06-29 12:33 ` Ilpo Järvinen
@ 2026-06-30 5:30 ` Anvesh Jain P
0 siblings, 0 replies; 5+ messages in thread
From: Anvesh Jain P @ 2026-06-30 5:30 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Sibi Sankar, Hans de Goede, Bryan O'Donoghue, Konrad Dybcio,
Dmitry Baryshkov, Maya Matuszczyk, linux-arm-msm,
platform-driver-x86, LKML
On 6/29/2026 6:03 PM, Ilpo Järvinen wrote:
> On Mon, 29 Jun 2026, 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@oss.qualcomm.com>
>> ---
>> 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,
>> + ec_cdev->cdev = devm_thermal_of_cooling_device_register(dev, 0, name, ec_cdev,
>> &qcom_ec_thermal_ops);
>> if (IS_ERR(ec_cdev->cdev)) {
>> return dev_err_probe(dev, PTR_ERR(ec_cdev->cdev),
>>
>> ---
>> base-commit: 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
>
> $ git log 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
> fatal: bad object 948efecf22e49aa4bf55bb73ec79a0ddcfd38571
>
> Please don't base your submissions on some random commits. There has never
> been code with (dev, 0, NULL, ...) in platforms drivers tree (and neither
> in Linus' tree).
>
You're right. I based this on a linux-next snapshot; the (dev, 0, NULL,
...) form only existed transiently as a merge-conflict fixup there and
never in the platform-drivers or Linus' tree. Current linux-next already
registers the fans with 'name' via
devm_thermal_of_child_cooling_device_register(), so the issue is gone.
I'll drop this patch.
--
Best Regards,
Anvesh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-06-30 5:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 9:16 [PATCH] platform: arm64: qcom-hamoa-ec: Register cooling devices with their name Anvesh Jain P
2026-06-29 11:21 ` Konrad Dybcio
2026-06-29 14:08 ` Anvesh Jain P
2026-06-29 12:33 ` Ilpo Järvinen
2026-06-30 5:30 ` Anvesh Jain P
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®