thermal: armada: fix broken temperature sensor in 4.19
Subsystems (2)
PATCH 1/1 thermal: armada: fix broken temperature sensor in 4.19
The patch 8c0e64ac4075b7ca870098ed2ad6089868f5fa7b ("thermal: armada: get rid of the ->is_valid() pointer") breaks temperature readings on the MacchiatoBIN board. Reading the temperature with
cat /sys/devices/virtual/thermal/thermal_zone*/temp
results in errors:
armada_thermal f06f808c.thermal: Temperature sensor reading not valid armada_thermal f2400078.thermal: Temperature sensor reading not valid armada_thermal f4400078.thermal: Temperature sensor reading not valid
The patch was meant as simple refactoring, but unfortunatelly, it reverses the condition in armada_get_temp_legacy, so that the error is reported if armada_is_valid returns true.
--- drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/armada_thermal.c +1 -1
@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(structint ret;/* Valid check */ -if (armada_is_valid (priv)) { +if (!armada_is_valid (priv)) {dev_err (priv->dev,"Temperature sensor reading not valid\n" );return -EIO ;
PATCH 1/1 thermal: armada: fix broken temperature sensor in 4.19
Quoted 10 lines · Mikulas Patocka
The patch
8c0e64ac4075b7ca870098ed2ad6089868f5fa7b("thermal: armada: get rid of the ->is_valid() pointer") breaks temperature readings on the MacchiatoBIN board. Reading the temperature with
cat/sys/devices/virtual/thermal/thermal_zone*/temp
results in errors:
armada_thermalf06f808c.thermal: Temperature sensor reading not validarmada_thermalf2400078.thermal: Temperature sensor reading not validarmada_thermalf4400078.thermal: Temperature sensor reading not valid
Quoted 6 lines
The patch was meant as simple refactoring, but unfortunatelly, it reverses the condition in
armada_get_temp_legacy, so that the error is reported ifarmada_is_validreturns true.Fixes 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")Cc stable at vger.kernel.org # 4.19
I should have added:
Quoted 18 lines
--- drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-4.19.4/drivers/thermal/armada_thermal.c
===================================================================drivers/thermal/armada_thermal.c +1
-1@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(structint ret;/* Valid check */ -if (armada_is_valid (priv)) { +if (!armada_is_valid (priv)) {dev_err (priv->dev,"Temperature sensor reading not valid\n" );return -EIO ;
PATCH 1/1 thermal: armada: fix broken temperature sensor in 4.19
In reply to Mikulas PatockaQuoted 6 lines · Mikulas Patocka
The patch
8c0e64ac4075b7ca870098ed2ad6089868f5fa7b("thermal: armada: get rid of the ->is_valid() pointer") breaks temperature readings on the MacchiatoBIN board. Reading the temperature with
cat/sys/devices/virtual/thermal/thermal_zone*/temp
results in errors:
Quoted 7 lines
armada_thermalf06f808c.thermal: Temperature sensor reading not validarmada_thermalf2400078.thermal: Temperature sensor reading not validarmada_thermalf4400078.thermal: Temperature sensor reading not validThe patch was meant as simple refactoring, but unfortunatelly, it reverses the condition in
armada_get_temp_legacy, so that the error is reported ifarmada_is_validreturns true.
I sent a patch for exactly this issue on 9th November... it doesn't seem to have made it into mainline yet.
Quoted 21 lines
Fixes 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")Cc stable at vger.kernel.org # 4.19--- drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-4.19.4/drivers/thermal/armada_thermal.c
===================================================================drivers/thermal/armada_thermal.c +1
-1@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(structint ret;/* Valid check */ -if (armada_is_valid (priv)) { +if (!armada_is_valid (priv)) {dev_err (priv->dev,"Temperature sensor reading not valid\n" );return -EIO ;
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up
Quoted 11 lines · Russell King - ARM Linux
Quoted 10 lines · Mikulas Patocka
The patch
8c0e64ac4075b7ca870098ed2ad6089868f5fa7b("thermal: armada: get rid of the ->is_valid() pointer") breaks temperature readings on the MacchiatoBIN board. Reading the temperature with
cat/sys/devices/virtual/thermal/thermal_zone*/temp
results in errors:
armada_thermalf06f808c.thermal: Temperature sensor reading not validarmada_thermalf2400078.thermal: Temperature sensor reading not validarmada_thermalf4400078.thermal: Temperature sensor reading not valid
Quoted 6 lines
Quoted 3 lines
The patch was meant as simple refactoring, but unfortunatelly, it reverses the condition in
armada_get_temp_legacy, so that the error is reported ifarmada_is_validreturns true.I sent a patch for exactly this issue on 9th November... it doesn't seem to have made it into mainline yet.
I applied Russell's patch.
Quoted 27 lines
Quoted 22 lines
Fixes 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")Cc [email protected] # 4.19--- drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-4.19.4/drivers/thermal/armada_thermal.c
===================================================================drivers/thermal/armada_thermal.c +1
-1@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(structint ret;/* Valid check */ -if (armada_is_valid (priv)) { +if (!armada_is_valid (priv)) {dev_err (priv->dev,"Temperature sensor reading not valid\n" );return -EIO ;Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up