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
300 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
305 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
308 *type = data->trips[trip].type; in of_thermal_get_trip_type()
313 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
318 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
321 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
326 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
331 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
335 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
340 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
345 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
348 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
353 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
358 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
362 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
584 struct device_node *trip; in thermal_of_populate_bind_params() local
594 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
595 if (!trip) { in thermal_of_populate_bind_params()
602 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
627 of_node_put(trip); in thermal_of_populate_bind_params()
683 struct thermal_trip *trip) in thermal_of_populate_trip() argument
693 trip->temperature = prop; in thermal_of_populate_trip()
700 trip->hysteresis = prop; in thermal_of_populate_trip()
702 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
709 trip->np = np; in thermal_of_populate_trip()