From: Mikulas Patocka <mpatocka@redhat.com> To: Miquel Raynal <miquel.raynal@bootlin.com>, Zhang Rui <rui.zhang@intel.com>, Eduardo Valentin <edubezval@gmail.com> Cc: Russell King <linux@armlinux.org.uk>, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH] thermal: armada: fix broken temperature sensor in 4.19 Date: Sat, 24 Nov 2018 18:45:00 -0500 (EST) [thread overview] Message-ID: <alpine.LRH.2.02.1811241838180.7275@file01.intranet.prod.int.rdu2.redhat.com> (raw) 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;
WARNING: multiple messages have this Message-ID (diff)
From: mpatocka@redhat.com (Mikulas Patocka) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] thermal: armada: fix broken temperature sensor in 4.19 Date: Sat, 24 Nov 2018 18:45:00 -0500 (EST) [thread overview] Message-ID: <alpine.LRH.2.02.1811241838180.7275@file01.intranet.prod.int.rdu2.redhat.com> (raw) 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;
next reply other threads:[~2018-11-24 23:45 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-24 23:45 Mikulas Patocka [this message] 2018-11-24 23:45 ` [PATCH] thermal: armada: fix broken temperature sensor in 4.19 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=alpine.LRH.2.02.1811241838180.7275@file01.intranet.prod.int.rdu2.redhat.com \ --to=mpatocka@redhat.com \ --cc=edubezval@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=miquel.raynal@bootlin.com \ --cc=rui.zhang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.