From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: linux-pm@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH 1/2] thermal: rcar_thermal: Remove temperature bound
Date: Tue, 14 Jan 2020 23:29:44 +0100 [thread overview]
Message-ID: <20200114222945.3128250-2-niklas.soderlund+renesas@ragnatech.se> (raw)
In-Reply-To: <20200114222945.3128250-1-niklas.soderlund+renesas@ragnatech.se>
The hardware manual states that the operation of the sensor is not
guaranteed outside the range of -40°C to 125°C, not that the readings
are invalid. Remove the bound check and try to deliver temperature
readings even if we are outside the guaranteed operation range.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
drivers/thermal/rcar_thermal.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index d0873de718da9218..2ae60b27a0183db1 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -275,13 +275,6 @@ static int rcar_thermal_get_current_temp(struct rcar_thermal_priv *priv,
tmp = MCELSIUS((priv->ctemp * 5) - 60);
mutex_unlock(&priv->lock);
- if ((tmp < MCELSIUS(-45)) || (tmp > MCELSIUS(125))) {
- struct device *dev = rcar_priv_to_dev(priv);
-
- dev_err(dev, "it couldn't measure temperature correctly\n");
- return -EIO;
- }
-
*temp = tmp;
return 0;
--
2.24.1
next prev parent reply other threads:[~2020-01-14 22:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 22:29 [PATCH 0/2] thermal: rcar_{gen3_}thermal: Remove temperature bound Niklas Söderlund
2020-01-14 22:29 ` Niklas Söderlund [this message]
2020-01-15 13:24 ` [PATCH 1/2] thermal: rcar_thermal: " Daniel Lezcano
2020-01-15 13:45 ` Niklas Söderlund
2020-01-15 18:15 ` Daniel Lezcano
2020-01-15 18:39 ` Niklas Söderlund
2020-01-15 18:52 ` Daniel Lezcano
2020-01-15 19:00 ` Niklas Söderlund
2020-01-14 22:29 ` [PATCH 2/2] thermal: rcar_gen3_thermal: " Niklas Söderlund
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=20200114222945.3128250-2-niklas.soderlund+renesas@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox