Re: [PATCH v3 4/4] ARM: tegra: dalmore: add thermal zones for nct1008

2014-08-25 Thread Wei Ni
On 08/25/2014 07:10 PM, Eduardo Valentin wrote:
> On Mon, Aug 25, 2014 at 02:29:48PM +0800, Wei Ni wrote:
>> From: lightning314 
>>
>> Add dt node to describe the thermal zone for the nct1008.
>>
>> Signed-off-by: Wei Ni 
>> ---
>>  arch/arm/boot/dts/tegra114-dalmore.dts | 20 +++-
>>  1 file changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts 
>> b/arch/arm/boot/dts/tegra114-dalmore.dts
>> index 5c21d21..94a1b5d 100644
>> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
>> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
>> @@ -779,12 +779,14 @@
>>  <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>>  };
>>  
>> -temperature-sensor@4c {
>> +nct1008: temperature-sensor@4c {
>>  compatible = "onnn,nct1008";
>>  reg = <0x4c>;
>>  vcc-supply = <&palmas_ldo6_reg>;
>>  interrupt-parent = <&gpio>;
>>  interrupts = ;
>> +
>> +#thermal-sensor-cells = <1>;
>>  };
>>  };
>>  
>> @@ -1283,4 +1285,20 @@
>>   <&tegra_car TEGRA114_CLK_EXTERN1>;
>>  clock-names = "pll_a", "pll_a_out0", "mclk";
>>  };
>> +
>> +thermal-zones {
>> +nct1008-local {
> 
> at this level, can the thermal zone name be a meaningful string? What
> part of the hardware does the local and remote monitors the the dalmore
> platform?

Oh, yes, you are right.
I think it's better to use "board_thermal_sensor: nct1008-local" and
"diode_thermal_sensor: nct1008-remote".

Thanks.
Wei.

> 
>> +polling-delay-passive = <2000>; /* milliseconds */
>> +polling-delay = <0>; /* milliseconds */
>> +
>> +thermal-sensors = <&nct1008 0>;
>> +};
>> +
>> +nct1008-remote {
>> +polling-delay-passive = <1000>; /* milliseconds */
>> +polling-delay = <0>; /* milliseconds */
>> +
>> +thermal-sensors = <&nct1008 1>;
>> +};
>> +};
>>  };
>> -- 
>> 1.8.1.5
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 4/4] ARM: tegra: dalmore: add thermal zones for nct1008

2014-08-25 Thread Wei Ni
On 08/25/2014 07:08 PM, Eduardo Valentin wrote:
> On Mon, Aug 25, 2014 at 02:29:48PM +0800, Wei Ni wrote:
>> From: lightning314 
>>
>> Add dt node to describe the thermal zone for the nct1008.
>>
>> Signed-off-by: Wei Ni 
>> ---
>>  arch/arm/boot/dts/tegra114-dalmore.dts | 20 +++-
>>  1 file changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts 
>> b/arch/arm/boot/dts/tegra114-dalmore.dts
>> index 5c21d21..94a1b5d 100644
>> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
>> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
>> @@ -779,12 +779,14 @@
>>  <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>>  };
>>  
>> -temperature-sensor@4c {
>> +nct1008: temperature-sensor@4c {
>>  compatible = "onnn,nct1008";
>>  reg = <0x4c>;
>>  vcc-supply = <&palmas_ldo6_reg>;
>>  interrupt-parent = <&gpio>;
>>  interrupts = ;
>> +
>> +#thermal-sensor-cells = <1>;
>>  };
>>  };
>>  
>> @@ -1283,4 +1285,20 @@
>>   <&tegra_car TEGRA114_CLK_EXTERN1>;
>>  clock-names = "pll_a", "pll_a_out0", "mclk";
>>  };
>> +
>> +thermal-zones {
>> +nct1008-local {
>> +polling-delay-passive = <2000>; /* milliseconds */
>> +polling-delay = <0>; /* milliseconds */
>> +
>> +thermal-sensors = <&nct1008 0>;
>> +};
>> +
>> +nct1008-remote {
>> +polling-delay-passive = <1000>; /* milliseconds */
>> +polling-delay = <0>; /* milliseconds */
>> +
>> +thermal-sensors = <&nct1008 1>;
>> +};
>> +};
> 
> The above zones misses the required properties, as per the thermal.txt
> binding description. Could you please have a look on those that are
> required and improve the zones above?

I changed the thermal.txt in the patch 3/4, to move these two properties
to optional property.
On the Dalmore, we just need to register these two sensors as thermal
zone devices.
Indeed, we have a skin-temperature driver, which used these two thermal
zone deives' temperature to estimator the skin temperature, so we
doesn't need to set trips and bind with any cooling devices on them.

Thanks.
Wei.

> 
>>  };
>> -- 
>> 1.8.1.5
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 4/4] ARM: tegra: dalmore: add thermal zones for nct1008

2014-08-25 Thread Eduardo Valentin
On Mon, Aug 25, 2014 at 02:29:48PM +0800, Wei Ni wrote:
> From: lightning314 
> 
> Add dt node to describe the thermal zone for the nct1008.
> 
> Signed-off-by: Wei Ni 
> ---
>  arch/arm/boot/dts/tegra114-dalmore.dts | 20 +++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts 
> b/arch/arm/boot/dts/tegra114-dalmore.dts
> index 5c21d21..94a1b5d 100644
> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
> @@ -779,12 +779,14 @@
>   <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>   };
>  
> - temperature-sensor@4c {
> + nct1008: temperature-sensor@4c {
>   compatible = "onnn,nct1008";
>   reg = <0x4c>;
>   vcc-supply = <&palmas_ldo6_reg>;
>   interrupt-parent = <&gpio>;
>   interrupts = ;
> +
> + #thermal-sensor-cells = <1>;
>   };
>   };
>  
> @@ -1283,4 +1285,20 @@
><&tegra_car TEGRA114_CLK_EXTERN1>;
>   clock-names = "pll_a", "pll_a_out0", "mclk";
>   };
> +
> + thermal-zones {
> + nct1008-local {

at this level, can the thermal zone name be a meaningful string? What
part of the hardware does the local and remote monitors the the dalmore
platform?

> + polling-delay-passive = <2000>; /* milliseconds */
> + polling-delay = <0>; /* milliseconds */
> +
> + thermal-sensors = <&nct1008 0>;
> + };
> +
> + nct1008-remote {
> + polling-delay-passive = <1000>; /* milliseconds */
> + polling-delay = <0>; /* milliseconds */
> +
> + thermal-sensors = <&nct1008 1>;
> + };
> + };
>  };
> -- 
> 1.8.1.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 4/4] ARM: tegra: dalmore: add thermal zones for nct1008

2014-08-25 Thread Eduardo Valentin
On Mon, Aug 25, 2014 at 02:29:48PM +0800, Wei Ni wrote:
> From: lightning314 
> 
> Add dt node to describe the thermal zone for the nct1008.
> 
> Signed-off-by: Wei Ni 
> ---
>  arch/arm/boot/dts/tegra114-dalmore.dts | 20 +++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts 
> b/arch/arm/boot/dts/tegra114-dalmore.dts
> index 5c21d21..94a1b5d 100644
> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
> @@ -779,12 +779,14 @@
>   <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>   };
>  
> - temperature-sensor@4c {
> + nct1008: temperature-sensor@4c {
>   compatible = "onnn,nct1008";
>   reg = <0x4c>;
>   vcc-supply = <&palmas_ldo6_reg>;
>   interrupt-parent = <&gpio>;
>   interrupts = ;
> +
> + #thermal-sensor-cells = <1>;
>   };
>   };
>  
> @@ -1283,4 +1285,20 @@
><&tegra_car TEGRA114_CLK_EXTERN1>;
>   clock-names = "pll_a", "pll_a_out0", "mclk";
>   };
> +
> + thermal-zones {
> + nct1008-local {
> + polling-delay-passive = <2000>; /* milliseconds */
> + polling-delay = <0>; /* milliseconds */
> +
> + thermal-sensors = <&nct1008 0>;
> + };
> +
> + nct1008-remote {
> + polling-delay-passive = <1000>; /* milliseconds */
> + polling-delay = <0>; /* milliseconds */
> +
> + thermal-sensors = <&nct1008 1>;
> + };
> + };

The above zones misses the required properties, as per the thermal.txt
binding description. Could you please have a look on those that are
required and improve the zones above?

>  };
> -- 
> 1.8.1.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 4/4] ARM: tegra: dalmore: add thermal zones for nct1008

2014-08-24 Thread Wei Ni
From: lightning314 

Add dt node to describe the thermal zone for the nct1008.

Signed-off-by: Wei Ni 
---
 arch/arm/boot/dts/tegra114-dalmore.dts | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts 
b/arch/arm/boot/dts/tegra114-dalmore.dts
index 5c21d21..94a1b5d 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -779,12 +779,14 @@
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
};
 
-   temperature-sensor@4c {
+   nct1008: temperature-sensor@4c {
compatible = "onnn,nct1008";
reg = <0x4c>;
vcc-supply = <&palmas_ldo6_reg>;
interrupt-parent = <&gpio>;
interrupts = ;
+
+   #thermal-sensor-cells = <1>;
};
};
 
@@ -1283,4 +1285,20 @@
 <&tegra_car TEGRA114_CLK_EXTERN1>;
clock-names = "pll_a", "pll_a_out0", "mclk";
};
+
+   thermal-zones {
+   nct1008-local {
+   polling-delay-passive = <2000>; /* milliseconds */
+   polling-delay = <0>; /* milliseconds */
+
+   thermal-sensors = <&nct1008 0>;
+   };
+
+   nct1008-remote {
+   polling-delay-passive = <1000>; /* milliseconds */
+   polling-delay = <0>; /* milliseconds */
+
+   thermal-sensors = <&nct1008 1>;
+   };
+   };
 };
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/