Lines Matching refs: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)
144 if (!data || trip >= data->ntrips || trip < 0)
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,
203 return data->ops->get_trend(data->sensor_data, trip, trend);
273 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip,
278 if (trip >= data->ntrips || trip < 0)
281 *type = data->trips[trip].type;
286 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip,
291 if (trip >= data->ntrips || trip < 0)
294 *temp = data->trips[trip].temperature;
299 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip,
304 if (trip >= data->ntrips || trip < 0)
310 ret = data->ops->set_trip_temp(data->sensor_data, trip, temp);
315 /* thermal framework should take care of data->mask & (1 << trip) */
316 data->trips[trip].temperature = temp;
321 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip,
326 if (trip >= data->ntrips || trip < 0)
329 *hyst = data->trips[trip].hysteresis;
334 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip,
339 if (trip >= data->ntrips || trip < 0)
342 /* thermal framework should take care of data->mask & (1 << trip) */
343 data->trips[trip].hysteresis = 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;
693 trip = of_parse_phandle(np, "trip", 0);
694 if (!trip) {
695 pr_err("missing trip property\n");
701 if (trip == trips[i].np) {
753 of_node_put(trip);
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)
819 trip->temperature = prop;
826 trip->hysteresis = prop;
828 ret = thermal_of_get_trip_type(np, &trip->type);
830 pr_err("wrong trip type property\n");
835 trip->np = np;