* [PATCH] thermal: armada: fix broken temperature sensor in 4.19
@ 2018-11-24 23:45 ` Mikulas Patocka
0 siblings, 0 replies; 8+ messages in thread
From: Mikulas Patocka @ 2018-11-24 23:45 UTC (permalink / raw)
To: Miquel Raynal, Zhang Rui, Eduardo Valentin
Cc: Russell King, linux-arm-kernel, linux-pm
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.
Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
Cc: stable@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
===================================================================
--- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
+++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
int 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;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] thermal: armada: fix broken temperature sensor in 4.19
@ 2018-11-24 23:45 ` Mikulas Patocka
0 siblings, 0 replies; 8+ messages in thread
From: Mikulas Patocka @ 2018-11-24 23:45 UTC (permalink / raw)
To: linux-arm-kernel
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.
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
===================================================================
--- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
+++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
@@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
int 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;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thermal: armada: fix broken temperature sensor in 4.19
2018-11-24 23:45 ` Mikulas Patocka
@ 2018-11-24 23:53 ` Mikulas Patocka
-1 siblings, 0 replies; 8+ messages in thread
From: Mikulas Patocka @ 2018-11-24 23:53 UTC (permalink / raw)
To: Miquel Raynal, Zhang Rui, Eduardo Valentin
Cc: Russell King, linux-arm-kernel, linux-pm
On Sat, 24 Nov 2018, Mikulas Patocka wrote:
> 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.
>
> Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
> Cc: stable@vger.kernel.org # 4.19
I should have added:
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> ---
> drivers/thermal/armada_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-4.19.4/drivers/thermal/armada_thermal.c
> ===================================================================
> --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> int 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;
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] thermal: armada: fix broken temperature sensor in 4.19
@ 2018-11-24 23:53 ` Mikulas Patocka
0 siblings, 0 replies; 8+ messages in thread
From: Mikulas Patocka @ 2018-11-24 23:53 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, 24 Nov 2018, Mikulas Patocka wrote:
> 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.
>
> Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
> Cc: stable at vger.kernel.org # 4.19
I should have added:
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> ---
> drivers/thermal/armada_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-4.19.4/drivers/thermal/armada_thermal.c
> ===================================================================
> --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> int 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;
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thermal: armada: fix broken temperature sensor in 4.19
2018-11-24 23:45 ` Mikulas Patocka
@ 2018-11-25 0:54 ` Russell King - ARM Linux
-1 siblings, 0 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2018-11-25 0:54 UTC (permalink / raw)
To: Mikulas Patocka
Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-arm-kernel, Miquel Raynal
On Sat, Nov 24, 2018 at 06:45:00PM -0500, Mikulas Patocka wrote:
> 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.
I sent a patch for exactly this issue on 9th November... it doesn't
seem to have made it into mainline yet.
>
> Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
> Cc: stable@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
> ===================================================================
> --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> int 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;
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] thermal: armada: fix broken temperature sensor in 4.19
@ 2018-11-25 0:54 ` Russell King - ARM Linux
0 siblings, 0 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2018-11-25 0:54 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 24, 2018 at 06:45:00PM -0500, Mikulas Patocka wrote:
> 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.
I sent a patch for exactly this issue on 9th November... it doesn't
seem to have made it into mainline yet.
>
> 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
> ===================================================================
> --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> int 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;
--
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thermal: armada: fix broken temperature sensor in 4.19
2018-11-25 0:54 ` Russell King - ARM Linux
@ 2018-12-05 5:38 ` Eduardo Valentin
-1 siblings, 0 replies; 8+ messages in thread
From: Eduardo Valentin @ 2018-12-05 5:38 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Zhang Rui, linux-pm, Mikulas Patocka, linux-arm-kernel, Miquel Raynal
On Sun, Nov 25, 2018 at 12:54:53AM +0000, Russell King - ARM Linux wrote:
> On Sat, Nov 24, 2018 at 06:45:00PM -0500, Mikulas Patocka wrote:
> > 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.
>
> 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.
>
> >
> > Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
> > Cc: stable@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
> > ===================================================================
> > --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> > +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> > @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> > int 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;
>
> --
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thermal: armada: fix broken temperature sensor in 4.19
@ 2018-12-05 5:38 ` Eduardo Valentin
0 siblings, 0 replies; 8+ messages in thread
From: Eduardo Valentin @ 2018-12-05 5:38 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Zhang Rui, linux-pm, Mikulas Patocka, linux-arm-kernel, Miquel Raynal
On Sun, Nov 25, 2018 at 12:54:53AM +0000, Russell King - ARM Linux wrote:
> On Sat, Nov 24, 2018 at 06:45:00PM -0500, Mikulas Patocka wrote:
> > 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.
>
> 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.
>
> >
> > Fixes: 8c0e64ac4075 ("thermal: armada: get rid of the ->is_valid() pointer")
> > Cc: stable@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
> > ===================================================================
> > --- linux-4.19.4.orig/drivers/thermal/armada_thermal.c 2018-11-25 00:19:20.000000000 +0100
> > +++ linux-4.19.4/drivers/thermal/armada_thermal.c 2018-11-25 00:39:49.000000000 +0100
> > @@ -357,7 +357,7 @@ static int armada_get_temp_legacy(struct
> > int 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;
>
> --
> 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-12-05 5:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24 23:45 [PATCH] thermal: armada: fix broken temperature sensor in 4.19 Mikulas Patocka
2018-11-24 23:45 ` Mikulas Patocka
2018-11-24 23:53 ` Mikulas Patocka
2018-11-24 23:53 ` Mikulas Patocka
2018-11-25 0:54 ` Russell King - ARM Linux
2018-11-25 0:54 ` Russell King - ARM Linux
2018-12-05 5:38 ` Eduardo Valentin
2018-12-05 5:38 ` Eduardo Valentin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.