diff mbox series

[v2,1/4] arm64: dts: qcom: sc7180: trogdor: Add label to charger thermal zone

Message ID 20210225103330.v2.1.I6a426324db3d98d6cfae8adf2598831bb30bba74@changeid
State Accepted
Commit e37584d1d86ba2574425c1e96fe2f43c949e1a66
Headers show
Series [v2,1/4] arm64: dts: qcom: sc7180: trogdor: Add label to charger thermal zone | expand

Commit Message

Matthias Kaehlcke Feb. 25, 2021, 6:33 p.m. UTC
Some revisions of trogdor boards use a thermistor for the charger
temperature which currently isn't supported by the PM6150 ADC
driver. This results in bogus temperature readings. Add a label
to the charger thermal zone to facilitate disabling of the thermal
zone on affected boards.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
- only add a label to the thermal zone
- updated subject and commit message

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Boyd Feb. 25, 2021, 7:45 p.m. UTC | #1
Quoting Matthias Kaehlcke (2021-02-25 10:33:34)
> Some revisions of trogdor boards use a thermistor for the charger
> temperature which currently isn't supported by the PM6150 ADC
> driver. This results in bogus temperature readings. Add a label
> to the charger thermal zone to facilitate disabling of the thermal
> zone on affected boards.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Stephen Boyd Feb. 25, 2021, 10:42 p.m. UTC | #2
Quoting Matthias Kaehlcke (2021-02-25 10:33:37)
> On trogdor the ADC thermal monitor is used for monitoring certain
> device temperatures. All trogdor boards have at least a thermistor
> for the charger temperature, optionally they may have others.
> 
> Currently the ADC thermal monitor is configured to use channel 1
> for the charger temperature. Given that all trogdor boards have
> the charger thermistor it makes more sense to use channel 0,
> and then let boards with other thermistors use channels 1, 2, 3,
> rather than 0, 2, 3.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

> 
> Changes in v2:
> - patch added to the series
> 
>  arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> index ab4efaece5cb..58e127b6ba1e 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
> @@ -19,7 +19,7 @@ charger_thermal: charger-thermal {
>                         polling-delay-passive = <0>;
>                         polling-delay = <0>;
>  
> -                       thermal-sensors = <&pm6150_adc_tm 1>;
> +                       thermal-sensors = <&pm6150_adc_tm 0>;

Too bad this can't point at the sensor "config" node itself. Looks error prone!

>  
>                         trips {
>                                 charger-crit {
> @@ -718,8 +718,8 @@ charger-thermistor@4f {
>  &pm6150_adc_tm {
>         status = "okay";
>  
> -       charger-thermistor@1 {
> -               reg = <1>;
> +       charger-thermistor@0 {
> +               reg = <0>;
>                 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
>                 qcom,ratiometric;
>                 qcom,hw-settle-time-us = <200>;
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 07c8b2c926c0..bda983da4eaf 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -15,7 +15,7 @@ 
 
 / {
 	thermal-zones {
-		charger-thermal {
+		charger_thermal: charger-thermal {
 			polling-delay-passive = <0>;
 			polling-delay = <0>;