• Home
  • Raw
  • Download

Lines Matching full:trip

25  * struct __thermal_cooling_bind_param - a cooling device for a trip point
27 * @min: minimum cooling state used at this trip point
28 * @max: maximum cooling state used at this trip point
38 * struct __thermal_bind_param - a match between trip and cooling device
41 * @trip_id: the trip point index
58 * @ntrips: number of trip points
59 * @trips: an array of trip points (0..ntrips - 1)
72 /* trip data */
110 * of_thermal_get_ntrips - function to export number of available trip
114 * This function is a globally visible wrapper to get number of trip points
117 * Return: number of available trip points, -ENODEV when data not available
131 * of_thermal_is_trip_valid - function to check if trip point is valid
134 * @trip: trip point to evaluate
136 * This function is responsible for checking if passed trip point is valid
138 * Return: true if trip point is valid, false otherwise
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()
153 * trip points
157 * This function provides a pointer to trip points table
159 * Return: pointer to trip points table, NULL otherwise
195 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
203 return data->ops->get_trend(data->sensor_data, trip, trend); in of_thermal_get_trend()
273 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
278 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
281 *type = data->trips[trip].type; in of_thermal_get_trip_type()
286 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
291 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
294 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
299 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
304 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
310 ret = data->ops->set_trip_temp(data->sensor_data, trip, temp); in of_thermal_set_trip_temp()
315 /* thermal framework should take care of data->mask & (1 << trip) */ in of_thermal_set_trip_temp()
316 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
321 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
326 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
329 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
334 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
339 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
342 /* thermal framework should take care of data->mask & (1 << trip) */ in of_thermal_set_trip_hyst()
343 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
666 * @trips: array of thermal zone trip points
667 * @ntrips: number of trip points inside trips.
671 * It needs the already parsed array of trip points of the thermal zone
683 struct device_node *trip; in thermal_of_populate_bind_params() local
693 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
694 if (!trip) { in thermal_of_populate_bind_params()
695 pr_err("missing trip property\n"); in thermal_of_populate_bind_params()
701 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
753 of_node_put(trip); in thermal_of_populate_bind_params()
760 * into the device tree binding of 'trip', property type.
772 * @type: Pointer to resulting trip type
774 * The function gets trip type string from property 'type',
799 * thermal_of_populate_trip - parse and fill one trip point data
800 * @np: DT node containing a trip point node
801 * @trip: trip point data structure to be filled up
803 * This function parses a trip point type of node represented by
804 * @np parameter and fills the read data into @trip data structure.
809 struct thermal_trip *trip) in thermal_of_populate_trip() argument
819 trip->temperature = prop; in thermal_of_populate_trip()
826 trip->hysteresis = prop; in thermal_of_populate_trip()
828 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
830 pr_err("wrong trip type property\n"); in thermal_of_populate_trip()
835 trip->np = np; in thermal_of_populate_trip()