Lines Matching refs:trip
140 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
144 if (!data || trip >= data->ntrips || trip < 0) in of_thermal_is_trip_valid()
192 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
200 return data->ops->get_trend(data->sensor_data, trip, trend); in of_thermal_get_trend()
270 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
275 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
278 *type = data->trips[trip].type; in of_thermal_get_trip_type()
283 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
288 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
291 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
296 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
301 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
307 ret = data->ops->set_trip_temp(data->sensor_data, trip, temp); in of_thermal_set_trip_temp()
313 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
318 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
323 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
326 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
331 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
336 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
340 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
680 struct device_node *trip; in thermal_of_populate_bind_params() local
690 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
691 if (!trip) { in thermal_of_populate_bind_params()
698 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
750 of_node_put(trip); in thermal_of_populate_bind_params()
806 struct thermal_trip *trip) in thermal_of_populate_trip() argument
816 trip->temperature = prop; in thermal_of_populate_trip()
823 trip->hysteresis = prop; in thermal_of_populate_trip()
825 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
832 trip->np = np; in thermal_of_populate_trip()