Lines Matching refs:trip
131 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
135 if (!data || trip >= data->ntrips || trip < 0) in of_thermal_is_trip_valid()
186 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
295 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
300 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
303 *type = data->trips[trip].type; in of_thermal_get_trip_type()
308 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
313 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
316 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
321 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
326 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
330 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
335 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
340 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
343 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
348 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
353 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
357 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
579 struct device_node *trip; in thermal_of_populate_bind_params() local
589 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
590 if (!trip) { in thermal_of_populate_bind_params()
597 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
622 of_node_put(trip); in thermal_of_populate_bind_params()
678 struct thermal_trip *trip) in thermal_of_populate_trip() argument
688 trip->temperature = prop; in thermal_of_populate_trip()
695 trip->hysteresis = prop; in thermal_of_populate_trip()
697 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
704 trip->np = np; in thermal_of_populate_trip()