[PATCH v2 1/9] dt-bindings: thermal: Define trips node in $defs

Francesco Dolcini francesco.dolcini at toradex.com
Mon Jun 20 11:19:44 PDT 2022


Hello Krzysztof,
thanks for the discussion and the review.

On Mon, Jun 20, 2022 at 08:05:48PM +0200, Krzysztof Kozlowski wrote:
> On 20/06/2022 19:43, Francesco Dolcini wrote:
> > On Mon, Jun 20, 2022 at 06:44:23PM +0200, Krzysztof Kozlowski wrote:
> >> On 20/06/2022 17:48, Francesco Dolcini wrote:
> >>> Ideally one could just implement the imx6/7 thermal sensor reading and
> >>> just make use of the thermal_of driver, however that would break
> >>> compatibility with a lot of existing system ... to me this is just a
> >>> no-go.
> >>
> >> This I did not understand...  What is not implemented in thermal sensor
> >> which would solve the issue? And why it cannot be implemented in
> >> backwards compatible way?
> > 
> > Currently the imx_thermal driver defines its own trip points. How would
> > you change the code to work with old device tree binaries using the
> > generic thermal_of driver? imx_thermal would need to be changed to be a
> > thermal sensor device, all the thermal trip point code removed.
> > The driver is using thermal_zone_device_register().
> > 
> > Maybe I am missing an obvious solution, just correct me if I am wrong.
> 
> Probably you would need to support both solutions in the same driver,
> based on presence of thermal-sensor-cells property. It won't be
> particularly easy code, but maybe it is worth anyway... I am quite
> surprised to see that IMX thermal driver does not use generic framework
> and does not support generic bindings.

#thermal-sensor-cells is already present in all dtsi using the
imx_thermal driver without reason (see my previous comment on the
topic [0]).

>From my point of view the situation is somehow a mess, not sure how to
proceed to be honest.

Francesco

[0] https://lore.kernel.org/all/acbf8ed3-0b8c-a0b2-88ef-7b13ad0908d5@linaro.org/




More information about the linux-arm-kernel mailing list