Lines Matching refs:trip
135 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
139 if (!data || trip >= data->ntrips || trip < 0) in of_thermal_is_trip_valid()
190 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
303 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
308 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
311 *type = data->trips[trip].type; in of_thermal_get_trip_type()
316 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
321 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
324 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
329 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
334 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
338 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
343 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
348 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
351 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
356 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
361 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
365 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
587 struct device_node *trip; in thermal_of_populate_bind_params() local
597 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
598 if (!trip) { in thermal_of_populate_bind_params()
605 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
630 of_node_put(trip); in thermal_of_populate_bind_params()
686 struct thermal_trip *trip) in thermal_of_populate_trip() argument
696 trip->temperature = prop; in thermal_of_populate_trip()
703 trip->hysteresis = prop; in thermal_of_populate_trip()
705 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
712 trip->np = np; in thermal_of_populate_trip()