2016-03-02 07:40:51

by Wei Ni

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

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 <[email protected]>
> ---
> 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_HALF BIT(7)
> -#define READBACK_NEGATE BIT(1)
> +#define READBACK_NEGATE BIT(0)
>
> #define FUSE_TSENSOR8_CALIB 0x180
> #define FUSE_SPARE_REALIGNMENT_REG_0 0x1fc
>


2016-03-03 00:08:39

by Matt Longnecker

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



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_NEGATE BIT(1)
> >+#define READBACK_NEGATE BIT(0)
I confirm that this change is technically correct. It fixes a bug.

2016-03-07 08:26:10

by Wei Ni

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

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_MASK 0xff00
>> > #define READBACK_VALUE_SHIFT 8
>> > #define READBACK_ADD_HALF BIT(7)
>> >-#define READBACK_NEGATE BIT(1)
>> >+#define READBACK_NEGATE BIT(0)
> I confirm that this change is technically correct. It fixes a bug.

2016-03-07 08:32:40

by Thierry Reding

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

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_NEGATE BIT(1)
> >>+#define READBACK_NEGATE BIT(0)
> I confirm that this change is technically correct. It fixes a bug.

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

Thierry


Attachments:
(No filename) (678.00 B)
signature.asc (819.00 B)
Download all attachments

2016-03-07 08:55:51

by Zhang, Rui

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

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:[email protected]]
> Sent: Monday, March 07, 2016 4:26 PM
> To: [email protected]; Zhang, Rui <[email protected]>;
> [email protected]
> Cc: Matt Longnecker <[email protected]>; [email protected];
> [email protected]; [email protected]
> 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_MASK 0xff00
> >> > #define READBACK_VALUE_SHIFT 8
> >> > #define READBACK_ADD_HALF BIT(7)
> >> >-#define READBACK_NEGATE BIT(1)
> >> >+#define READBACK_NEGATE BIT(0)
> > I confirm that this change is technically correct. It fixes a bug.

2016-03-07 09:16:00

by Wei Ni

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



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 <[email protected]>

Or I need to send v2 patch to add it?

Thanks.
Wei.

>
> Thanks,
> rui
>
>> -----Original Message-----
>> From: Wei Ni [mailto:[email protected]]
>> Sent: Monday, March 07, 2016 4:26 PM
>> To: [email protected]; Zhang, Rui <[email protected]>;
>> [email protected]
>> Cc: Matt Longnecker <[email protected]>; [email protected];
>> [email protected]; [email protected]
>> 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_MASK 0xff00
>>>>> #define READBACK_VALUE_SHIFT 8
>>>>> #define READBACK_ADD_HALF BIT(7)
>>>>> -#define READBACK_NEGATE BIT(1)
>>>>> +#define READBACK_NEGATE BIT(0)
>>> I confirm that this change is technically correct. It fixes a bug.

2016-03-07 12:28:15

by Zhang, Rui

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

Oh, BTW, you need to CC [email protected] as well, so that we can see your patch via patchwork.

Please resend patch V2 to [email protected].

Thanks,
rui

> -----Original Message-----
> From: Wei Ni [mailto:[email protected]]
> Sent: Monday, March 07, 2016 5:16 PM
> To: Zhang, Rui <[email protected]>; [email protected];
> [email protected]; Eduardo Valentin <[email protected]>
> Cc: Matt Longnecker <[email protected]>; [email protected];
> [email protected]; [email protected]
> 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 <[email protected]>
>
> Or I need to send v2 patch to add it?
>
> Thanks.
> Wei.
>
> >
> > Thanks,
> > rui
> >
> >> -----Original Message-----
> >> From: Wei Ni [mailto:[email protected]]
> >> Sent: Monday, March 07, 2016 4:26 PM
> >> To: [email protected]; Zhang, Rui <[email protected]>;
> >> [email protected]
> >> Cc: Matt Longnecker <[email protected]>;
> [email protected];
> >> [email protected]; [email protected]
> >> 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_MASK 0xff00
> >>>>> #define READBACK_VALUE_SHIFT 8
> >>>>> #define READBACK_ADD_HALF BIT(7)
> >>>>> -#define READBACK_NEGATE BIT(1)
> >>>>> +#define READBACK_NEGATE BIT(0)
> >>> I confirm that this change is technically correct. It fixes a bug.