diff mbox

[v2,2/3] ARM: dt: t114 dalmore: add dt entry for nct1008

Message ID 1375944991-29182-3-git-send-email-wni@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Ni Aug. 8, 2013, 6:56 a.m. UTC
Enable thermal sensor nct1008 for t114 dalmore.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 arch/arm/boot/dts/tegra114-dalmore.dts |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Stephen Warren Aug. 8, 2013, 5:35 p.m. UTC | #1
On 08/08/2013 12:56 AM, Wei Ni wrote:
> Enable thermal sensor nct1008 for t114 dalmore.

It'd be best to remove this patch from the series; send one series to
the LM90 maintainer with just the driver and DT binding changes, and
another series to the Tegra maintainer with the *.dts changes. You can
tell me not to apply the *.dts changes until the driver/binding changes
are accepted (or just wait until they are before sending the patch).
Sergei Shtylyov Aug. 8, 2013, 8:36 p.m. UTC | #2
Hello.

On 08/08/2013 10:56 AM, Wei Ni wrote:

> Enable thermal sensor nct1008 for t114 dalmore.

> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
>   arch/arm/boot/dts/tegra114-dalmore.dts |   10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)

> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
> index b5a42f0..9d4d2b2 100644
> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
> @@ -738,6 +738,14 @@
>   			realtek,ldo1-en-gpios =
>   				<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>   		};
> +
> +		nct1008 {

    ePAPR [1] says: "the name of a node should be somewhat generic, reflecting 
the function of the device and not its precise programming model". So I 
suggest "thermal"

> +			compatible = "onnn,nct1008";
> +			reg = <0x4c>;
> +			vdd-supply = <&palmas_ldo6_reg>;
> +			interrupt-parent = <&gpio>;
> +			interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
> +		};
>   	};

[1] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf

WBR, Sergei
Stephen Warren Aug. 8, 2013, 8:40 p.m. UTC | #3
On 08/08/2013 02:36 PM, Sergei Shtylyov wrote:
> Hello.
> 
> On 08/08/2013 10:56 AM, Wei Ni wrote:
> 
>> Enable thermal sensor nct1008 for t114 dalmore.
> 
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>>   arch/arm/boot/dts/tegra114-dalmore.dts |   10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts
>> b/arch/arm/boot/dts/tegra114-dalmore.dts
>> index b5a42f0..9d4d2b2 100644
>> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
>> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
>> @@ -738,6 +738,14 @@
>>               realtek,ldo1-en-gpios =
>>                   <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>>           };
>> +
>> +        nct1008 {
> 
>    ePAPR [1] says: "the name of a node should be somewhat generic,
> reflecting the function of the device and not its precise programming
> model". So I suggest "thermal"

True, although there's quite some precedent for node-names being the
chip name for external chips in existing DTs. If we change this node
name, I'd like to see a patch that makes all the other "nct1008" nodes
match the new name...
Guenter Roeck Aug. 8, 2013, 9:33 p.m. UTC | #4
On 08/08/2013 01:40 PM, Stephen Warren wrote:
> On 08/08/2013 02:36 PM, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 08/08/2013 10:56 AM, Wei Ni wrote:
>>
>>> Enable thermal sensor nct1008 for t114 dalmore.
>>
>>> Signed-off-by: Wei Ni <wni@nvidia.com>
>>> ---
>>>    arch/arm/boot/dts/tegra114-dalmore.dts |   10 +++++++++-
>>>    1 file changed, 9 insertions(+), 1 deletion(-)
>>
>>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts
>>> b/arch/arm/boot/dts/tegra114-dalmore.dts
>>> index b5a42f0..9d4d2b2 100644
>>> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
>>> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
>>> @@ -738,6 +738,14 @@
>>>                realtek,ldo1-en-gpios =
>>>                    <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>>>            };
>>> +
>>> +        nct1008 {
>>
>>     ePAPR [1] says: "the name of a node should be somewhat generic,
>> reflecting the function of the device and not its precise programming
>> model". So I suggest "thermal"
>
> True, although there's quite some precedent for node-names being the
> chip name for external chips in existing DTs. If we change this node
> name, I'd like to see a patch that makes all the other "nct1008" nodes
> match the new name...
>

On the other side, one should not use a bad example as an argument or excuse
to make the same mistake again (though I keep hearing it all the time ... ).
I for my part tend to use something like temp-sensor or temp-sensor@1c.
Advantage of that kind of node name is that it auto-describes the node.

Guenter
Wei Ni Aug. 9, 2013, 6:06 a.m. UTC | #5
On 08/09/2013 01:35 AM, Stephen Warren wrote:
> On 08/08/2013 12:56 AM, Wei Ni wrote:
>> Enable thermal sensor nct1008 for t114 dalmore.
> 
> It'd be best to remove this patch from the series; send one series to
> the LM90 maintainer with just the driver and DT binding changes, and
> another series to the Tegra maintainer with the *.dts changes. You can
> tell me not to apply the *.dts changes until the driver/binding changes
> are accepted (or just wait until they are before sending the patch).

Ok, I will do it.

>
Wei Ni Aug. 9, 2013, 6:16 a.m. UTC | #6
On 08/09/2013 05:33 AM, Guenter Roeck wrote:
> On 08/08/2013 01:40 PM, Stephen Warren wrote:
>> On 08/08/2013 02:36 PM, Sergei Shtylyov wrote:
>>> Hello.
>>>
>>> On 08/08/2013 10:56 AM, Wei Ni wrote:
>>>
>>>> Enable thermal sensor nct1008 for t114 dalmore.
>>>
>>>> Signed-off-by: Wei Ni <wni@nvidia.com>
>>>> ---
>>>>    arch/arm/boot/dts/tegra114-dalmore.dts |   10 +++++++++-
>>>>    1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>>> diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts
>>>> b/arch/arm/boot/dts/tegra114-dalmore.dts
>>>> index b5a42f0..9d4d2b2 100644
>>>> --- a/arch/arm/boot/dts/tegra114-dalmore.dts
>>>> +++ b/arch/arm/boot/dts/tegra114-dalmore.dts
>>>> @@ -738,6 +738,14 @@
>>>>                realtek,ldo1-en-gpios =
>>>>                    <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
>>>>            };
>>>> +
>>>> +        nct1008 {
>>>
>>>     ePAPR [1] says: "the name of a node should be somewhat generic,
>>> reflecting the function of the device and not its precise programming
>>> model". So I suggest "thermal"
>>
>> True, although there's quite some precedent for node-names being the
>> chip name for external chips in existing DTs. If we change this node
>> name, I'd like to see a patch that makes all the other "nct1008" nodes
>> match the new name...
>>
> 
> On the other side, one should not use a bad example as an argument or excuse
> to make the same mistake again (though I keep hearing it all the time ... ).
> I for my part tend to use something like temp-sensor or temp-sensor@1c.
> Advantage of that kind of node name is that it auto-describes the node.

Ok, so I will set the node name as "temp-sensor"
And I will send out patches to change all other "nct1008" nodes.

> 
> Guenter
>
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index b5a42f0..9d4d2b2 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -738,6 +738,14 @@ 
 			realtek,ldo1-en-gpios =
 				<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
 		};
+
+		nct1008 {
+			compatible = "onnn,nct1008";
+			reg = <0x4c>;
+			vdd-supply = <&palmas_ldo6_reg>;
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
+		};
 	};
 
 	i2c@7000d000 {
@@ -945,7 +953,7 @@ 
 						regulator-max-microvolt = <1800000>;
 					};
 
-					ldo6 {
+					palmas_ldo6_reg: ldo6 {
 						regulator-name = "vdd-sensor-2v85";
 						regulator-min-microvolt = <2850000>;
 						regulator-max-microvolt = <2850000>;