• Home
  • Raw
  • Download

Lines Matching full:trip

22  * struct __thermal_bind_param - a match between trip and cooling device
24 * @trip_id: the trip point index
26 * @min: minimum cooling state used at this trip point
27 * @max: maximum cooling state used at this trip point
45 * @ntrips: number of trip points
46 * @trips: an array of trip points (0..ntrips - 1)
60 /* trip data */
98 * of_thermal_get_ntrips - function to export number of available trip
102 * This function is a globally visible wrapper to get number of trip points
105 * Return: number of available trip points, -ENODEV when data not available
119 * of_thermal_is_trip_valid - function to check if trip point is valid
122 * @trip: trip point to evaluate
124 * This function is responsible for checking if passed trip point is valid
126 * Return: true if trip point is valid, false otherwise
128 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
132 if (!data || trip >= data->ntrips || trip < 0) in of_thermal_is_trip_valid()
141 * trip points
145 * This function provides a pointer to trip points table
147 * Return: pointer to trip points table, NULL otherwise
180 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
188 return data->ops->get_trend(data->sensor_data, trip, trend); in of_thermal_get_trend()
279 static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_type() argument
284 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_type()
287 *type = data->trips[trip].type; in of_thermal_get_trip_type()
292 static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_temp() argument
297 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_temp()
300 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp()
305 static int of_thermal_set_trip_temp(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_temp() argument
310 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_temp()
316 ret = data->ops->set_trip_temp(data->sensor_data, trip, temp); in of_thermal_set_trip_temp()
321 /* thermal framework should take care of data->mask & (1 << trip) */ in of_thermal_set_trip_temp()
322 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp()
327 static int of_thermal_get_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_get_trip_hyst() argument
332 if (trip >= data->ntrips || trip < 0) in of_thermal_get_trip_hyst()
335 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst()
340 static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, in of_thermal_set_trip_hyst() argument
345 if (trip >= data->ntrips || trip < 0) in of_thermal_set_trip_hyst()
348 /* thermal framework should take care of data->mask & (1 << trip) */ in of_thermal_set_trip_hyst()
349 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst()
642 * @trips: array of thermal zone trip points
643 * @ntrips: number of trip points inside trips.
647 * It needs the already parsed array of trip points of the thermal zone
658 struct device_node *trip; in thermal_of_populate_bind_params() local
668 trip = of_parse_phandle(np, "trip", 0); in thermal_of_populate_bind_params()
669 if (!trip) { in thermal_of_populate_bind_params()
670 pr_err("missing trip property\n"); in thermal_of_populate_bind_params()
676 if (trip == trips[i].np) { in thermal_of_populate_bind_params()
701 of_node_put(trip); in thermal_of_populate_bind_params()
708 * into the device tree binding of 'trip', property type.
720 * @type: Pointer to resulting trip type
722 * The function gets trip type string from property 'type',
747 * thermal_of_populate_trip - parse and fill one trip point data
748 * @np: DT node containing a trip point node
749 * @trip: trip point data structure to be filled up
751 * This function parses a trip point type of node represented by
752 * @np parameter and fills the read data into @trip data structure.
757 struct thermal_trip *trip) in thermal_of_populate_trip() argument
767 trip->temperature = prop; in thermal_of_populate_trip()
774 trip->hysteresis = prop; in thermal_of_populate_trip()
776 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
778 pr_err("wrong trip type property\n"); in thermal_of_populate_trip()
783 trip->np = np; in thermal_of_populate_trip()