Skip to content

Commit dff6d4f

Browse files
Niklas Söderlunddlezcano
authored andcommitted
thermal: rcar_thermal: Remove temperature bound
The hardware manual states that the operation of the sensor is not guaranteed outside the range of -45°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 <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 35709c4 commit dff6d4f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/thermal/rcar_thermal.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,7 @@ static int rcar_thermal_get_current_temp(struct rcar_thermal_priv *priv,
275275
tmp = MCELSIUS((priv->ctemp * 5) - 60);
276276
mutex_unlock(&priv->lock);
277277

278-
if ((tmp < MCELSIUS(-45)) || (tmp > MCELSIUS(125))) {
279-
struct device *dev = rcar_priv_to_dev(priv);
280-
281-
dev_err(dev, "it couldn't measure temperature correctly\n");
282-
return -EIO;
283-
}
278+
/* Guaranteed operating range is -45C to 125C. */
284279

285280
*temp = tmp;
286281

0 commit comments

Comments
 (0)