diff mbox

thermal/drivers/hisi: Remove confusing error message

Message ID 20170822080427.GB13910@leoy-ThinkPad-T440 (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Leo Yan Aug. 22, 2017, 8:04 a.m. UTC
Hi Daniel,

On Mon, Aug 21, 2017 at 12:06:17PM +0200, Daniel Lezcano wrote:

[...]

> Hi Leo,
> 
> a cleanest solution would be either:
> 
>  - add the 3 missing thermal sensors in the DT and default to the id 2

Yeah, so do you think below change works for you?

---8<---

    ARM64: dts: hisilicon: add missed thermal sensors for Hi6220

    The thermal driver tries to register four sensors but the DT only binds
    one sensor (sensor ID 2) with thermal zone, as result the thermal driver
    reports failure for missed thermal sensor binding.

    This patch adds missed thermal sensor for Hi6220, so can dismiss the
    booting failure log.

> or
> 
>  - remove all the code assuming 4 sensors and deal with the one unique
> sensor

I personally prefer to avoid doing this, if only register one unique
sensor this will let us have no flexiblity for trying multiple sensors
on this platform.

[...]

Thanks,
Leo Yan

Comments

Daniel Lezcano Aug. 22, 2017, 8:25 a.m. UTC | #1
On 22/08/2017 10:04, Leo Yan wrote:
> Hi Daniel,
> 
> On Mon, Aug 21, 2017 at 12:06:17PM +0200, Daniel Lezcano wrote:
> 
> [...]
> 
>> Hi Leo,
>>
>> a cleanest solution would be either:
>>
>>  - add the 3 missing thermal sensors in the DT and default to the id 2
> 
> Yeah, so do you think below change works for you?

Isn't it possible to set the delay also ? so we don't have to send
another patch if we want to use one of those instead of 2.


> ---8<---
> 
>     ARM64: dts: hisilicon: add missed thermal sensors for Hi6220
> 
>     The thermal driver tries to register four sensors but the DT only binds
>     one sensor (sensor ID 2) with thermal zone, as result the thermal driver
>     reports failure for missed thermal sensor binding.
> 
>     This patch adds missed thermal sensor for Hi6220, so can dismiss the
>     booting failure log.
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> index eacbe0d..44c2bc7 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> @@ -833,6 +833,18 @@
>  
>                 thermal-zones {
>  
> +                       local: local {
> +                               polling-delay = <0>;
> +                               polling-delay-passive = <0>;
> +                               thermal-sensors = <&tsensor 0>;
> +                       };
> +
> +                       cls1: cls1 {
> +                               polling-delay = <0>;
> +                               polling-delay-passive = <0>;
> +                               thermal-sensors = <&tsensor 1>;
> +                       };
> +
>                         cls0: cls0 {
>                                 polling-delay = <1000>;
>                                 polling-delay-passive = <100>;
> @@ -862,6 +874,12 @@
>                                         };
>                                 };
>                         };
> +
> +                       gpu: gpu {
> +                               polling-delay = <0>;
> +                               polling-delay-passive = <0>;
> +                               thermal-sensors = <&tsensor 3>;
> +                       };
>                 };
>  
> 
>> or
>>
>>  - remove all the code assuming 4 sensors and deal with the one unique
>> sensor
> 
> I personally prefer to avoid doing this, if only register one unique
> sensor this will let us have no flexiblity for trying multiple sensors
> on this platform.

Ok, I will on the other side give a cleanup in the driver to optimize
the sensors lookup.

Thanks
  -- Daniel
Leo Yan Aug. 23, 2017, 6:13 a.m. UTC | #2
On Tue, Aug 22, 2017 at 10:25:07AM +0200, Daniel Lezcano wrote:
> On 22/08/2017 10:04, Leo Yan wrote:
> > Hi Daniel,
> > 
> > On Mon, Aug 21, 2017 at 12:06:17PM +0200, Daniel Lezcano wrote:
> > 
> > [...]
> > 
> >> Hi Leo,
> >>
> >> a cleanest solution would be either:
> >>
> >>  - add the 3 missing thermal sensors in the DT and default to the id 2
> > 
> > Yeah, so do you think below change works for you?
> 
> Isn't it possible to set the delay also ? so we don't have to send
> another patch if we want to use one of those instead of 2.

Yeah, this makes sense for me. Have shared updated DT binding patch
with you, you could stack it with your changes.

Thanks for the suggestion.

[...]

Thanks,
Leo Yan
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index eacbe0d..44c2bc7 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -833,6 +833,18 @@ 
 
                thermal-zones {
 
+                       local: local {
+                               polling-delay = <0>;
+                               polling-delay-passive = <0>;
+                               thermal-sensors = <&tsensor 0>;
+                       };
+
+                       cls1: cls1 {
+                               polling-delay = <0>;
+                               polling-delay-passive = <0>;
+                               thermal-sensors = <&tsensor 1>;
+                       };
+
                        cls0: cls0 {
                                polling-delay = <1000>;
                                polling-delay-passive = <100>;
@@ -862,6 +874,12 @@ 
                                        };
                                };
                        };
+
+                       gpu: gpu {
+                               polling-delay = <0>;
+                               polling-delay-passive = <0>;
+                               thermal-sensors = <&tsensor 3>;
+                       };
                };