Re: [PATCH 1/8] dt-bindings: embedded-controller: qcom,hamoa-crd-ec: Add qcom,tsens

Anvesh Jain P <[email protected]> Wed, 29 Jul 2026 18:30:07 +0530
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On 7/29/2026 6:02 PM, Krzysztof Kozlowski wrote:
> On 29/07/2026 13:54, Anvesh Jain P wrote:
>>
>>
>> On 7/29/2026 4:38 PM, Krzysztof Kozlowski wrote:
>>> On 28/07/2026 19:44, Anvesh Jain P wrote:
>>>> Add the qcom,tsens property so Hamoa-based boards can list the tsens
>>>> providers, and how many leading sensor IDs on each, whose readings the
>>>> driver averages to compute the SoC junction temperature reported to
>>>> the EC for fan control.
>>>>
>>>> The generic thermal-sensors property has no standard semantic for
>>>> selecting a range of sensor IDs from a provider without enumerating
>>>> each one, so a vendor-specific phandle-array with an explicit sensor
>>>> count is used instead.
>>>>
>>>> Signed-off-by: Anvesh Jain P <[email protected]>
>>>> ---
>>>>  .../embedded-controller/qcom,hamoa-crd-ec.yaml     | 31 ++++++++++++++++++++++
>>>>  1 file changed, 31 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml b/Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml
>>>> index c07483aa5937..ec809fcd03ab 100644
>>>> --- a/Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml
>>>> +++ b/Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml
>>>> @@ -33,11 +33,40 @@ properties:
>>>>    interrupts:
>>>>      maxItems: 1
>>>>  
>>>> +  # A generic "thermal-sensors" phandle only identifies individual sensor
>>>> +  # IDs, and thermal zones are a Linux-side grouping of those sensors, not
>>>> +  # a devicetree concept the EC cares about. What the driver actually needs
>>>> +  # is raw readings from a contiguous range of leading sensor IDs on each
>>>> +  # tsens provider, averaged together, so qcom,tsens pairs each provider
>>>> +  # phandle with a count instead of enumerating every sensor cell.
>>>> +  qcom,tsens:
>>>
>>>
>>> What is the point of having internal review and then IGNORE that review?
>>>
>>> NAK
>>>
>>> Best regards,
>>> Krzysztof
>>
>> Krzysztof — for context: I did move to thermal-sensors after your
>> review, but Konrad separately suggested keeping just the provider
>> phandle instead of enumerating every sensor cell, since we only need a
>> leading range per provider. qcom,tsens was meant to combine both
>> suggestions, not ignore yours. Happy to instead just go with your
>> original suggestion and use plain thermal-sensors, enumerating each
>> sensor — let me know which you'd prefer.
> 
> How does <"thermal-sensors" phandle only identifies individual sensor>
> and this phandlel does not? I see absolutely no difference thus you
> duplicated the property, which I EXPLICITLY asked NOT TO during internal
> review.
>

Fair — there's no real difference in shape, qcom,tsens is still just
a phandle plus an integer cell, same as thermal-sensors. The only
thing that changed is what the integer means (a count instead of a
sensor ID), which isn't enough to justify a separate property.

I'll drop qcom,tsens and go back to thermal-sensors, enumerating
each sensor ID explicitly, as you originally suggested. Will send a v2.

> 
> 
> Best regards,
> Krzysztof

-- 
Best Regards,
Anvesh