summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2020-01-17 19:05:54 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-01-27 13:43:24 +0300
commit0f510a2457cbbba18a98492bab1bf540be57ebd1 (patch)
treea1554a59a71e39191183d2a6e81ed042e6f63c99 /drivers/thermal
parentdff6d4f80509d1aaf07da9534f3f4b6876876caf (diff)
downloadlinux-0f510a2457cbbba18a98492bab1bf540be57ebd1.tar.xz
thermal: rcar_gen3_thermal: Remove temperature bound
The hardware manual states that the operation of the sensor is not guaranteed with temperatures above 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> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200117160554.3812787-3-niklas.soderlund+renesas@ragnatech.se
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/rcar_gen3_thermal.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 1460cf9d9f1c..72877bdc072d 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -182,9 +182,7 @@ static int rcar_gen3_thermal_get_temp(void *devdata, int *temp)
tsc->coef.a2);
mcelsius = FIXPT_TO_MCELSIUS(val);
- /* Make sure we are inside specifications */
- if ((mcelsius < MCELSIUS(-40)) || (mcelsius > MCELSIUS(125)))
- return -EIO;
+ /* Guaranteed operating range is -40C to 125C. */
/* Round value to device granularity setting */
*temp = rcar_gen3_thermal_round(mcelsius);