RE: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Zhang, Rui
Oh, BTW, you need to CC linux...@vger.kernel.org as well, so that we can see 
your patch via patchwork.

Please resend patch V2 to linux...@vger.kernel.org.

Thanks,
rui

> -Original Message-
> From: Wei Ni [mailto:w...@nvidia.com]
> Sent: Monday, March 07, 2016 5:16 PM
> To: Zhang, Rui <rui.zh...@intel.com>; thierry.red...@gmail.com;
> mikko.perttu...@kapsi.fi; Eduardo Valentin <edubez...@gmail.com>
> Cc: Matt Longnecker <mlongnec...@nvidia.com>; swar...@wwwdotorg.org;
> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
> Importance: High
> 
> 
> 
> On 2016年03月07日 16:55, Zhang, Rui wrote:
> > For the soc thermal driver changes, you'd better cc Eduardo at the same
> time so that he can include this in his soc-thermal pull request.
> > Surely I can queue this for 4.6 if Eduardo miss this.
> 
> Thanks for your help.
> 
> BTW, please add:
> Reviewed-by: Matt Longnecker <mlongnec...@nvidia.com>
> 
> Or I need to send v2 patch to add it?
> 
> Thanks.
> Wei.
> 
> >
> > Thanks,
> > rui
> >
> >> -Original Message-
> >> From: Wei Ni [mailto:w...@nvidia.com]
> >> Sent: Monday, March 07, 2016 4:26 PM
> >> To: thierry.red...@gmail.com; Zhang, Rui <rui.zh...@intel.com>;
> >> mikko.perttu...@kapsi.fi
> >> Cc: Matt Longnecker <mlongnec...@nvidia.com>;
> swar...@wwwdotorg.org;
> >> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of
> >> temperature
> >> Importance: High
> >>
> >> Hi, Rui and Thierry
> >> Could you please take a look at this patch?
> >>
> >> Thanks.
> >> Wei.
> >>
> >> On 2016年03月03日 08:08, Matt Longnecker wrote:
> >>>
> >>>
> >>> On 03/01/2016 11:40 PM, Wei Ni wrote:
> >>>>> diff --git a/drivers/thermal/tegra_soctherm.c
> >> b/drivers/thermal/tegra_soctherm.c
> >>>>> index 74ea5765938b..136975220c92 100644
> >>>>> --- a/drivers/thermal/tegra_soctherm.c
> >>>>> +++ b/drivers/thermal/tegra_soctherm.c
> >>>>> @@ -57,7 +57,7 @@
> >>>>>  #define READBACK_VALUE_MASK0xff00
> >>>>>  #define READBACK_VALUE_SHIFT8
> >>>>>  #define READBACK_ADD_HALFBIT(7)
> >>>>> -#define READBACK_NEGATEBIT(1)
> >>>>> +#define READBACK_NEGATEBIT(0)
> >>> I confirm that this change is technically correct. It fixes a bug.


RE: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Zhang, Rui
Oh, BTW, you need to CC linux...@vger.kernel.org as well, so that we can see 
your patch via patchwork.

Please resend patch V2 to linux...@vger.kernel.org.

Thanks,
rui

> -Original Message-
> From: Wei Ni [mailto:w...@nvidia.com]
> Sent: Monday, March 07, 2016 5:16 PM
> To: Zhang, Rui ; thierry.red...@gmail.com;
> mikko.perttu...@kapsi.fi; Eduardo Valentin 
> Cc: Matt Longnecker ; swar...@wwwdotorg.org;
> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
> Importance: High
> 
> 
> 
> On 2016年03月07日 16:55, Zhang, Rui wrote:
> > For the soc thermal driver changes, you'd better cc Eduardo at the same
> time so that he can include this in his soc-thermal pull request.
> > Surely I can queue this for 4.6 if Eduardo miss this.
> 
> Thanks for your help.
> 
> BTW, please add:
> Reviewed-by: Matt Longnecker 
> 
> Or I need to send v2 patch to add it?
> 
> Thanks.
> Wei.
> 
> >
> > Thanks,
> > rui
> >
> >> -Original Message-
> >> From: Wei Ni [mailto:w...@nvidia.com]
> >> Sent: Monday, March 07, 2016 4:26 PM
> >> To: thierry.red...@gmail.com; Zhang, Rui ;
> >> mikko.perttu...@kapsi.fi
> >> Cc: Matt Longnecker ;
> swar...@wwwdotorg.org;
> >> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of
> >> temperature
> >> Importance: High
> >>
> >> Hi, Rui and Thierry
> >> Could you please take a look at this patch?
> >>
> >> Thanks.
> >> Wei.
> >>
> >> On 2016年03月03日 08:08, Matt Longnecker wrote:
> >>>
> >>>
> >>> On 03/01/2016 11:40 PM, Wei Ni wrote:
> >>>>> diff --git a/drivers/thermal/tegra_soctherm.c
> >> b/drivers/thermal/tegra_soctherm.c
> >>>>> index 74ea5765938b..136975220c92 100644
> >>>>> --- a/drivers/thermal/tegra_soctherm.c
> >>>>> +++ b/drivers/thermal/tegra_soctherm.c
> >>>>> @@ -57,7 +57,7 @@
> >>>>>  #define READBACK_VALUE_MASK0xff00
> >>>>>  #define READBACK_VALUE_SHIFT8
> >>>>>  #define READBACK_ADD_HALFBIT(7)
> >>>>> -#define READBACK_NEGATEBIT(1)
> >>>>> +#define READBACK_NEGATEBIT(0)
> >>> I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni


On 2016年03月07日 16:55, Zhang, Rui wrote:
> For the soc thermal driver changes, you'd better cc Eduardo at the same time 
> so that he can include this in his soc-thermal pull request.
> Surely I can queue this for 4.6 if Eduardo miss this.

Thanks for your help.

BTW, please add:
Reviewed-by: Matt Longnecker <mlongnec...@nvidia.com>

Or I need to send v2 patch to add it?

Thanks.
Wei.

> 
> Thanks,
> rui
> 
>> -Original Message-
>> From: Wei Ni [mailto:w...@nvidia.com]
>> Sent: Monday, March 07, 2016 4:26 PM
>> To: thierry.red...@gmail.com; Zhang, Rui <rui.zh...@intel.com>;
>> mikko.perttu...@kapsi.fi
>> Cc: Matt Longnecker <mlongnec...@nvidia.com>; swar...@wwwdotorg.org;
>> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
>> Importance: High
>>
>> Hi, Rui and Thierry
>> Could you please take a look at this patch?
>>
>> Thanks.
>> Wei.
>>
>> On 2016年03月03日 08:08, Matt Longnecker wrote:
>>>
>>>
>>> On 03/01/2016 11:40 PM, Wei Ni wrote:
>>>>> diff --git a/drivers/thermal/tegra_soctherm.c
>> b/drivers/thermal/tegra_soctherm.c
>>>>> index 74ea5765938b..136975220c92 100644
>>>>> --- a/drivers/thermal/tegra_soctherm.c
>>>>> +++ b/drivers/thermal/tegra_soctherm.c
>>>>> @@ -57,7 +57,7 @@
>>>>>  #define READBACK_VALUE_MASK0xff00
>>>>>  #define READBACK_VALUE_SHIFT8
>>>>>  #define READBACK_ADD_HALFBIT(7)
>>>>> -#define READBACK_NEGATEBIT(1)
>>>>> +#define READBACK_NEGATEBIT(0)
>>> I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni


On 2016年03月07日 16:55, Zhang, Rui wrote:
> For the soc thermal driver changes, you'd better cc Eduardo at the same time 
> so that he can include this in his soc-thermal pull request.
> Surely I can queue this for 4.6 if Eduardo miss this.

Thanks for your help.

BTW, please add:
Reviewed-by: Matt Longnecker 

Or I need to send v2 patch to add it?

Thanks.
Wei.

> 
> Thanks,
> rui
> 
>> -Original Message-
>> From: Wei Ni [mailto:w...@nvidia.com]
>> Sent: Monday, March 07, 2016 4:26 PM
>> To: thierry.red...@gmail.com; Zhang, Rui ;
>> mikko.perttu...@kapsi.fi
>> Cc: Matt Longnecker ; swar...@wwwdotorg.org;
>> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
>> Importance: High
>>
>> Hi, Rui and Thierry
>> Could you please take a look at this patch?
>>
>> Thanks.
>> Wei.
>>
>> On 2016年03月03日 08:08, Matt Longnecker wrote:
>>>
>>>
>>> On 03/01/2016 11:40 PM, Wei Ni wrote:
>>>>> diff --git a/drivers/thermal/tegra_soctherm.c
>> b/drivers/thermal/tegra_soctherm.c
>>>>> index 74ea5765938b..136975220c92 100644
>>>>> --- a/drivers/thermal/tegra_soctherm.c
>>>>> +++ b/drivers/thermal/tegra_soctherm.c
>>>>> @@ -57,7 +57,7 @@
>>>>>  #define READBACK_VALUE_MASK0xff00
>>>>>  #define READBACK_VALUE_SHIFT8
>>>>>  #define READBACK_ADD_HALFBIT(7)
>>>>> -#define READBACK_NEGATEBIT(1)
>>>>> +#define READBACK_NEGATEBIT(0)
>>> I confirm that this change is technically correct. It fixes a bug.


RE: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Zhang, Rui
For the soc thermal driver changes, you'd better cc Eduardo at the same time so 
that he can include this in his soc-thermal pull request.
Surely I can queue this for 4.6 if Eduardo miss this.

Thanks,
rui

> -Original Message-
> From: Wei Ni [mailto:w...@nvidia.com]
> Sent: Monday, March 07, 2016 4:26 PM
> To: thierry.red...@gmail.com; Zhang, Rui <rui.zh...@intel.com>;
> mikko.perttu...@kapsi.fi
> Cc: Matt Longnecker <mlongnec...@nvidia.com>; swar...@wwwdotorg.org;
> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
> Importance: High
> 
> Hi, Rui and Thierry
> Could you please take a look at this patch?
> 
> Thanks.
> Wei.
> 
> On 2016年03月03日 08:08, Matt Longnecker wrote:
> >
> >
> > On 03/01/2016 11:40 PM, Wei Ni wrote:
> >> >diff --git a/drivers/thermal/tegra_soctherm.c
> b/drivers/thermal/tegra_soctherm.c
> >> >index 74ea5765938b..136975220c92 100644
> >> >--- a/drivers/thermal/tegra_soctherm.c
> >> >+++ b/drivers/thermal/tegra_soctherm.c
> >> >@@ -57,7 +57,7 @@
> >> >  #define READBACK_VALUE_MASK0xff00
> >> >  #define READBACK_VALUE_SHIFT8
> >> >  #define READBACK_ADD_HALFBIT(7)
> >> >-#define READBACK_NEGATEBIT(1)
> >> >+#define READBACK_NEGATEBIT(0)
> > I confirm that this change is technically correct. It fixes a bug.


RE: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Zhang, Rui
For the soc thermal driver changes, you'd better cc Eduardo at the same time so 
that he can include this in his soc-thermal pull request.
Surely I can queue this for 4.6 if Eduardo miss this.

Thanks,
rui

> -Original Message-
> From: Wei Ni [mailto:w...@nvidia.com]
> Sent: Monday, March 07, 2016 4:26 PM
> To: thierry.red...@gmail.com; Zhang, Rui ;
> mikko.perttu...@kapsi.fi
> Cc: Matt Longnecker ; swar...@wwwdotorg.org;
> linux-te...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature
> Importance: High
> 
> Hi, Rui and Thierry
> Could you please take a look at this patch?
> 
> Thanks.
> Wei.
> 
> On 2016年03月03日 08:08, Matt Longnecker wrote:
> >
> >
> > On 03/01/2016 11:40 PM, Wei Ni wrote:
> >> >diff --git a/drivers/thermal/tegra_soctherm.c
> b/drivers/thermal/tegra_soctherm.c
> >> >index 74ea5765938b..136975220c92 100644
> >> >--- a/drivers/thermal/tegra_soctherm.c
> >> >+++ b/drivers/thermal/tegra_soctherm.c
> >> >@@ -57,7 +57,7 @@
> >> >  #define READBACK_VALUE_MASK0xff00
> >> >  #define READBACK_VALUE_SHIFT8
> >> >  #define READBACK_ADD_HALFBIT(7)
> >> >-#define READBACK_NEGATEBIT(1)
> >> >+#define READBACK_NEGATEBIT(0)
> > I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni


On 2016年03月07日 16:38, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Mon, Feb 29, 2016 at 05:51:20PM +0800, Wei Ni wrote:
>> The sign bit of temperature readback is bit 0, not bit 1.
>> Change to BIT(0) to fix it.
>>
>> Signed-off-by: Wei Ni 
>> ---
>>  drivers/thermal/tegra_soctherm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/thermal/tegra_soctherm.c 
>> b/drivers/thermal/tegra_soctherm.c
>> index 74ea5765938b..136975220c92 100644
>> --- a/drivers/thermal/tegra_soctherm.c
>> +++ b/drivers/thermal/tegra_soctherm.c
>> @@ -57,7 +57,7 @@
>>  #define READBACK_VALUE_MASK 0xff00
>>  #define READBACK_VALUE_SHIFT8
>>  #define READBACK_ADD_HALF   BIT(7)
>> -#define READBACK_NEGATE BIT(1)
>> +#define READBACK_NEGATE BIT(0)
> 
> I haven't found this documented anywhere. The register documentation
> indicates that the SOC_THERM_TSENSOR_TEMP1 and SOC_THERM_TSENSOR_TEMP2
> registers are in some kind of "temp readback format", but I can't find
> any specification of that format. Can you point me at the source for
> this information and file an internal bug report so that we can get
> the documentation updated?

Sure, I will do it.
Thanks for your comment.

> 
> Thierry
> 
> * Unknown Key
> * 0x7F3EB3A1
> 


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni


On 2016年03月07日 16:38, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Mon, Feb 29, 2016 at 05:51:20PM +0800, Wei Ni wrote:
>> The sign bit of temperature readback is bit 0, not bit 1.
>> Change to BIT(0) to fix it.
>>
>> Signed-off-by: Wei Ni 
>> ---
>>  drivers/thermal/tegra_soctherm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/thermal/tegra_soctherm.c 
>> b/drivers/thermal/tegra_soctherm.c
>> index 74ea5765938b..136975220c92 100644
>> --- a/drivers/thermal/tegra_soctherm.c
>> +++ b/drivers/thermal/tegra_soctherm.c
>> @@ -57,7 +57,7 @@
>>  #define READBACK_VALUE_MASK 0xff00
>>  #define READBACK_VALUE_SHIFT8
>>  #define READBACK_ADD_HALF   BIT(7)
>> -#define READBACK_NEGATE BIT(1)
>> +#define READBACK_NEGATE BIT(0)
> 
> I haven't found this documented anywhere. The register documentation
> indicates that the SOC_THERM_TSENSOR_TEMP1 and SOC_THERM_TSENSOR_TEMP2
> registers are in some kind of "temp readback format", but I can't find
> any specification of that format. Can you point me at the source for
> this information and file an internal bug report so that we can get
> the documentation updated?

Sure, I will do it.
Thanks for your comment.

> 
> Thierry
> 
> * Unknown Key
> * 0x7F3EB3A1
> 


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Thierry Reding
On Mon, Feb 29, 2016 at 05:51:20PM +0800, Wei Ni wrote:
> The sign bit of temperature readback is bit 0, not bit 1.
> Change to BIT(0) to fix it.
> 
> Signed-off-by: Wei Ni 
> ---
>  drivers/thermal/tegra_soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/tegra_soctherm.c 
> b/drivers/thermal/tegra_soctherm.c
> index 74ea5765938b..136975220c92 100644
> --- a/drivers/thermal/tegra_soctherm.c
> +++ b/drivers/thermal/tegra_soctherm.c
> @@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK  0xff00
>  #define READBACK_VALUE_SHIFT 8
>  #define READBACK_ADD_HALFBIT(7)
> -#define READBACK_NEGATE  BIT(1)
> +#define READBACK_NEGATE  BIT(0)

I haven't found this documented anywhere. The register documentation
indicates that the SOC_THERM_TSENSOR_TEMP1 and SOC_THERM_TSENSOR_TEMP2
registers are in some kind of "temp readback format", but I can't find
any specification of that format. Can you point me at the source for
this information and file an internal bug report so that we can get
the documentation updated?

Thierry


signature.asc
Description: PGP signature


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Thierry Reding
On Mon, Feb 29, 2016 at 05:51:20PM +0800, Wei Ni wrote:
> The sign bit of temperature readback is bit 0, not bit 1.
> Change to BIT(0) to fix it.
> 
> Signed-off-by: Wei Ni 
> ---
>  drivers/thermal/tegra_soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/tegra_soctherm.c 
> b/drivers/thermal/tegra_soctherm.c
> index 74ea5765938b..136975220c92 100644
> --- a/drivers/thermal/tegra_soctherm.c
> +++ b/drivers/thermal/tegra_soctherm.c
> @@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK  0xff00
>  #define READBACK_VALUE_SHIFT 8
>  #define READBACK_ADD_HALFBIT(7)
> -#define READBACK_NEGATE  BIT(1)
> +#define READBACK_NEGATE  BIT(0)

I haven't found this documented anywhere. The register documentation
indicates that the SOC_THERM_TSENSOR_TEMP1 and SOC_THERM_TSENSOR_TEMP2
registers are in some kind of "temp readback format", but I can't find
any specification of that format. Can you point me at the source for
this information and file an internal bug report so that we can get
the documentation updated?

Thierry


signature.asc
Description: PGP signature


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Thierry Reding
On Wed, Mar 02, 2016 at 04:08:33PM -0800, Matt Longnecker wrote:
> 
> 
> On 03/01/2016 11:40 PM, Wei Ni wrote:
> >>diff --git a/drivers/thermal/tegra_soctherm.c 
> >>b/drivers/thermal/tegra_soctherm.c
> >>index 74ea5765938b..136975220c92 100644
> >>--- a/drivers/thermal/tegra_soctherm.c
> >>+++ b/drivers/thermal/tegra_soctherm.c
> >>@@ -57,7 +57,7 @@
> >>  #define READBACK_VALUE_MASK   0xff00
> >>  #define READBACK_VALUE_SHIFT  8
> >>  #define READBACK_ADD_HALF BIT(7)
> >>-#define READBACK_NEGATEBIT(1)
> >>+#define READBACK_NEGATEBIT(0)
> I confirm that this change is technically correct. It fixes a bug.

That usually translates to a Reviewed-by: tag. =)

Thierry


signature.asc
Description: PGP signature


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Thierry Reding
On Wed, Mar 02, 2016 at 04:08:33PM -0800, Matt Longnecker wrote:
> 
> 
> On 03/01/2016 11:40 PM, Wei Ni wrote:
> >>diff --git a/drivers/thermal/tegra_soctherm.c 
> >>b/drivers/thermal/tegra_soctherm.c
> >>index 74ea5765938b..136975220c92 100644
> >>--- a/drivers/thermal/tegra_soctherm.c
> >>+++ b/drivers/thermal/tegra_soctherm.c
> >>@@ -57,7 +57,7 @@
> >>  #define READBACK_VALUE_MASK   0xff00
> >>  #define READBACK_VALUE_SHIFT  8
> >>  #define READBACK_ADD_HALF BIT(7)
> >>-#define READBACK_NEGATEBIT(1)
> >>+#define READBACK_NEGATEBIT(0)
> I confirm that this change is technically correct. It fixes a bug.

That usually translates to a Reviewed-by: tag. =)

Thierry


signature.asc
Description: PGP signature


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni
Hi, Rui and Thierry
Could you please take a look at this patch?

Thanks.
Wei.

On 2016年03月03日 08:08, Matt Longnecker wrote:
> 
> 
> On 03/01/2016 11:40 PM, Wei Ni wrote:
>> >diff --git a/drivers/thermal/tegra_soctherm.c 
>> >b/drivers/thermal/tegra_soctherm.c
>> >index 74ea5765938b..136975220c92 100644
>> >--- a/drivers/thermal/tegra_soctherm.c
>> >+++ b/drivers/thermal/tegra_soctherm.c
>> >@@ -57,7 +57,7 @@
>> >  #define READBACK_VALUE_MASK0xff00
>> >  #define READBACK_VALUE_SHIFT8
>> >  #define READBACK_ADD_HALFBIT(7)
>> >-#define READBACK_NEGATEBIT(1)
>> >+#define READBACK_NEGATEBIT(0)
> I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-07 Thread Wei Ni
Hi, Rui and Thierry
Could you please take a look at this patch?

Thanks.
Wei.

On 2016年03月03日 08:08, Matt Longnecker wrote:
> 
> 
> On 03/01/2016 11:40 PM, Wei Ni wrote:
>> >diff --git a/drivers/thermal/tegra_soctherm.c 
>> >b/drivers/thermal/tegra_soctherm.c
>> >index 74ea5765938b..136975220c92 100644
>> >--- a/drivers/thermal/tegra_soctherm.c
>> >+++ b/drivers/thermal/tegra_soctherm.c
>> >@@ -57,7 +57,7 @@
>> >  #define READBACK_VALUE_MASK0xff00
>> >  #define READBACK_VALUE_SHIFT8
>> >  #define READBACK_ADD_HALFBIT(7)
>> >-#define READBACK_NEGATEBIT(1)
>> >+#define READBACK_NEGATEBIT(0)
> I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-02 Thread Matt Longnecker



On 03/01/2016 11:40 PM, Wei Ni wrote:

>diff --git a/drivers/thermal/tegra_soctherm.c 
b/drivers/thermal/tegra_soctherm.c
>index 74ea5765938b..136975220c92 100644
>--- a/drivers/thermal/tegra_soctherm.c
>+++ b/drivers/thermal/tegra_soctherm.c
>@@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK   0xff00
>  #define READBACK_VALUE_SHIFT  8
>  #define READBACK_ADD_HALF BIT(7)
>-#define READBACK_NEGATEBIT(1)
>+#define READBACK_NEGATEBIT(0)

I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-02 Thread Matt Longnecker



On 03/01/2016 11:40 PM, Wei Ni wrote:

>diff --git a/drivers/thermal/tegra_soctherm.c 
b/drivers/thermal/tegra_soctherm.c
>index 74ea5765938b..136975220c92 100644
>--- a/drivers/thermal/tegra_soctherm.c
>+++ b/drivers/thermal/tegra_soctherm.c
>@@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK   0xff00
>  #define READBACK_VALUE_SHIFT  8
>  #define READBACK_ADD_HALF BIT(7)
>-#define READBACK_NEGATEBIT(1)
>+#define READBACK_NEGATEBIT(0)

I confirm that this change is technically correct. It fixes a bug.


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-01 Thread Wei Ni
Hi, Rui & Thierry & Matt
Could you please take a look on this patch.
It's a bug on the temperature's sign bit, it can't show the negative
temperature, although it will not cause problems for now.

Thanks.
Wei.

On 2016年02月29日 17:51, Wei Ni wrote:
> The sign bit of temperature readback is bit 0, not bit 1.
> Change to BIT(0) to fix it.
> 
> Signed-off-by: Wei Ni 
> ---
>  drivers/thermal/tegra_soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/tegra_soctherm.c 
> b/drivers/thermal/tegra_soctherm.c
> index 74ea5765938b..136975220c92 100644
> --- a/drivers/thermal/tegra_soctherm.c
> +++ b/drivers/thermal/tegra_soctherm.c
> @@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK  0xff00
>  #define READBACK_VALUE_SHIFT 8
>  #define READBACK_ADD_HALFBIT(7)
> -#define READBACK_NEGATE  BIT(1)
> +#define READBACK_NEGATE  BIT(0)
>  
>  #define FUSE_TSENSOR8_CALIB  0x180
>  #define FUSE_SPARE_REALIGNMENT_REG_0 0x1fc
> 


Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature

2016-03-01 Thread Wei Ni
Hi, Rui & Thierry & Matt
Could you please take a look on this patch.
It's a bug on the temperature's sign bit, it can't show the negative
temperature, although it will not cause problems for now.

Thanks.
Wei.

On 2016年02月29日 17:51, Wei Ni wrote:
> The sign bit of temperature readback is bit 0, not bit 1.
> Change to BIT(0) to fix it.
> 
> Signed-off-by: Wei Ni 
> ---
>  drivers/thermal/tegra_soctherm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/tegra_soctherm.c 
> b/drivers/thermal/tegra_soctherm.c
> index 74ea5765938b..136975220c92 100644
> --- a/drivers/thermal/tegra_soctherm.c
> +++ b/drivers/thermal/tegra_soctherm.c
> @@ -57,7 +57,7 @@
>  #define READBACK_VALUE_MASK  0xff00
>  #define READBACK_VALUE_SHIFT 8
>  #define READBACK_ADD_HALFBIT(7)
> -#define READBACK_NEGATE  BIT(1)
> +#define READBACK_NEGATE  BIT(0)
>  
>  #define FUSE_TSENSOR8_CALIB  0x180
>  #define FUSE_SPARE_REALIGNMENT_REG_0 0x1fc
>