thermal: tegra_soctherm: fix sign bit of temperature
Subsystems (2)
PATCH 1/1 thermal: tegra_soctherm: fix sign bit of temperature
The sign bit of temperature readback is bit 0, not bit 1. Change to BIT(0) to fix it.
--- drivers/thermal/tegra_soctherm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/tegra_soctherm.c +1 -1
@@ -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
Signature · 1 line
1.9.1
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.
Quoted 22 lines · Wei Ni
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(-)drivers/thermal/tegra_soctherm.c +1
-1@@ -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
Quoted 10 lines · Wei Ni
drivers/thermal/tegra_soctherm.c line 60
Quoted 10 lines
drivers/thermal/tegra_soctherm.c +1
-1@@ -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.
Hi, Rui and Thierry
Could you please take a look at this patch?
Thanks.
Wei.
Quoted 14 lines · Matt Longnecker
Quoted 10 lines · Wei Ni
drivers/thermal/tegra_soctherm.c line 60
Quoted 10 lines
drivers/thermal/tegra_soctherm.c +1
-1@@ -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.
Zhang, Rui
reviewerFor 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
Quoted 32 lines
-----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: HighHi, Rui and Thierry
Could you please take a look at this patch?Thanks.
Wei.Quoted 4 lines · Matt Longnecker
Quoted 1 line · Wei Ni
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/thermal/tegra_soctherm.cQuoted 10 lines
Quoted 9 lines
drivers/thermal/tegra_soctherm.c line 60
Quoted 9 lines
index
74ea5765938b..136975220c92100644drivers/thermal/tegra_soctherm.c +1
-1@@ -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.
Wei Ni
Reviewed-by Matt LongneckerQuoted 2 lines · 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 for your help.
BTW, please add:
Or I need to send v2 patch to add it?
Thanks.
Wei.
Quoted 36 lines
Thanks,
ruiQuoted 32 lines
-----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: HighHi, Rui and Thierry
Could you please take a look at this patch?Thanks.
Wei.Quoted 4 lines · Matt Longnecker
Quoted 1 line · Wei Ni
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/thermal/tegra_soctherm.cQuoted 10 lines
Quoted 9 lines
drivers/thermal/tegra_soctherm.c line 60
Quoted 9 lines
index
74ea5765938b..136975220c92100644drivers/thermal/tegra_soctherm.c +1
-1@@ -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.
Zhang, Rui
reviewerOh, 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
Quoted 65 lines
-----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: HighQuoted 1 line · 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.
Quoted 1 line
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.Quoted 10 lines
Thanks,
ruiQuoted 6 lines
-----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]>;Quoted 27 lines
Quoted 27 lines
[email protected]; [email protected]
Subject: Re: [PATCH] thermal:tegra_soctherm: fix sign bit of temperature
Importance: HighHi, Rui and Thierry
Could you please take a look at this patch?Thanks.
Wei.Quoted 4 lines · Matt Longnecker
Quoted 1 line · Wei Ni
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/thermal/tegra_soctherm.cQuoted 10 lines
Quoted 9 lines
drivers/thermal/tegra_soctherm.c line 60
Quoted 9 lines
index
74ea5765938b..136975220c92100644drivers/thermal/tegra_soctherm.c +1
-1@@ -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.
Quoted 14 lines · Matt Longnecker
Quoted 10 lines · Wei Ni
drivers/thermal/tegra_soctherm.c line 60
Quoted 10 lines
drivers/thermal/tegra_soctherm.c +1
-1@@ -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
Quoted 13 lines · Wei Ni
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(-)drivers/thermal/tegra_soctherm.c +0
-0
drivers/thermal/tegra_soctherm.c line 60
Quoted 5 lines
drivers/thermal/tegra_soctherm.c +1
-1@@ -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 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
Quoted 20 lines · Thierry Reding
* PGP Signed by an unknown key
Quoted 17 lines · Wei Ni
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(-)drivers/thermal/tegra_soctherm.c +0
-1@@ -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)
Quoted 8 lines
drivers/thermal/tegra_soctherm.c line 60
Quoted 1 line
drivers/thermal/tegra_soctherm.c +1
-0+#define READBACK_NEGATE BIT(0)I haven't found this documented anywhere. The register documentation indicates that the
SOC_THERM_TSENSOR_TEMP1andSOC_THERM_TSENSOR_TEMP2registers 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.
Quoted 6 lines
Thierry
* Unknown Key
*0x7F3EB3A1