Skip to content

Commit

Permalink
thermal: rcar_gen3_thermal: update max temperature clamp
Browse files Browse the repository at this point in the history
Change the upper limit to clamp the high temperature value to 120C when
setting trip points.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Niklas Söderlund authored and Eduardo Valentin committed May 6, 2018
1 parent fc66ddf commit 270ba43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/rcar_gen3_thermal.c
Original file line number Diff line number Diff line change
@@ -207,8 +207,8 @@ static int rcar_gen3_thermal_set_trips(void *devdata, int low, int high)
{
struct rcar_gen3_thermal_tsc *tsc = devdata;

low = clamp_val(low, -40000, 125000);
high = clamp_val(high, -40000, 125000);
low = clamp_val(low, -40000, 120000);
high = clamp_val(high, -40000, 120000);

rcar_gen3_thermal_write(tsc, REG_GEN3_IRQTEMP1,
rcar_gen3_thermal_mcelsius_to_temp(tsc, low));

0 comments on commit 270ba43

Please sign in to comment.