forked from luck/tmp_suning_uos_patched
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
This commit is contained in:
parent
dff6d4f805
commit
0f510a2457
|
@ -182,9 +182,7 @@ static int rcar_gen3_thermal_get_temp(void *devdata, int *temp)
|
||||||
tsc->coef.a2);
|
tsc->coef.a2);
|
||||||
mcelsius = FIXPT_TO_MCELSIUS(val);
|
mcelsius = FIXPT_TO_MCELSIUS(val);
|
||||||
|
|
||||||
/* Make sure we are inside specifications */
|
/* Guaranteed operating range is -40C to 125C. */
|
||||||
if ((mcelsius < MCELSIUS(-40)) || (mcelsius > MCELSIUS(125)))
|
|
||||||
return -EIO;
|
|
||||||
|
|
||||||
/* Round value to device granularity setting */
|
/* Round value to device granularity setting */
|
||||||
*temp = rcar_gen3_thermal_round(mcelsius);
|
*temp = rcar_gen3_thermal_round(mcelsius);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user