On Wed, Jan 18, 2023 at 7:16 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
From: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
The thermal framework gives the possibility to register the trip
points with the thermal zone. When that is done, no get_trip_* ops are
needed and they can be removed.
Convert ops content logic into generic trip points and register them with the
thermal zone.
Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
@@ -173,8 +166,13 @@ static int update_trip_temp(struct intel_soc_dts_sensor_entry *dts,
if (status)
goto err_restore_te_out;
- dts->trip_types[thres_index] = trip_type;
-
+ status = get_trip_temp(sensors, thres_index, &temp);
+ if (status)
+ goto err_restore_te_out;
+
+ dts->trips[thres_index].type = trip_type;
+ dts->trips[thres_index].temperature = temp;
This change doesn't look correct to me, because this function takes
temp as an argument and it is used to populate the trip with it at
least in some cases.
Why should temp be overwritten here?