Lines Matching defs:data
22 /*** Private data structures to represent thermal device tree data ***/
62 * @sensor_data: sensor private data used while reading temperature and trend
72 /* trip data */
76 /* cooling binding data */
90 struct __thermal_zone *data = tz->devdata;
92 if (!data->ops || !data->ops->get_temp)
95 return data->ops->get_temp(data->sensor_data, temp);
101 struct __thermal_zone *data = tz->devdata;
103 if (!data->ops || !data->ops->set_trips)
106 return data->ops->set_trips(data->sensor_data, low, high);
117 * Return: number of available trip points, -ENODEV when data not available
121 struct __thermal_zone *data = tz->devdata;
123 if (!data || IS_ERR(data))
126 return data->ntrips;
142 struct __thermal_zone *data = tz->devdata;
144 if (!data || trip >= data->ntrips || trip < 0)
164 struct __thermal_zone *data = tz->devdata;
166 if (!data)
169 return data->trips;
187 struct __thermal_zone *data = tz->devdata;
189 if (!data->ops || !data->ops->set_emul_temp)
192 return data->ops->set_emul_temp(data->sensor_data, temp);
198 struct __thermal_zone *data = tz->devdata;
200 if (!data->ops || !data->ops->get_trend)
203 return data->ops->get_trend(data->sensor_data, trip, trend);
209 struct __thermal_zone *data = thermal->devdata;
214 if (!data || IS_ERR(data))
218 for (i = 0; i < data->num_tbps; i++) {
219 tbp = data->tbps + i;
244 struct __thermal_zone *data = thermal->devdata;
249 if (!data || IS_ERR(data))
253 for (i = 0; i < data->num_tbps; i++) {
254 tbp = data->tbps + i;
276 struct __thermal_zone *data = tz->devdata;
278 if (trip >= data->ntrips || trip < 0)
281 *type = data->trips[trip].type;
289 struct __thermal_zone *data = tz->devdata;
291 if (trip >= data->ntrips || trip < 0)
294 *temp = data->trips[trip].temperature;
302 struct __thermal_zone *data = tz->devdata;
304 if (trip >= data->ntrips || trip < 0)
307 if (data->ops && data->ops->set_trip_temp) {
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;
324 struct __thermal_zone *data = tz->devdata;
326 if (trip >= data->ntrips || trip < 0)
329 *hyst = data->trips[trip].hysteresis;
337 struct __thermal_zone *data = tz->devdata;
339 if (trip >= data->ntrips || trip < 0)
342 /* thermal framework should take care of data->mask & (1 << trip) */
343 data->trips[trip].hysteresis = hyst;
351 struct __thermal_zone *data = tz->devdata;
354 for (i = 0; i < data->ntrips; i++)
355 if (data->trips[i].type == THERMAL_TRIP_CRITICAL) {
356 *temp = data->trips[i].temperature;
379 struct device_node *sensor, void *data,
396 tz->sensor_data = data;
466 * @data: a private pointer (owned by the caller) that will be passed
476 * pointer. When called, it will have the private pointer @data back.
479 * pointer. When called, it will have the private pointer @data back.
493 thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data,
520 data, ops);
542 * This function removes the sensor callbacks and private data from the
586 void *data)
593 return *r == data;
603 * @data: a private pointer (owned by the caller) that will be passed
617 void *data, const struct thermal_zone_of_device_ops *ops)
626 tzd = thermal_zone_of_sensor_register(dev, sensor_id, data, ops);
645 * This function removes the sensor callbacks and private data from the
663 * thermal_of_populate_bind_params - parse and fill cooling map data
665 * @__tbp: data structure to be filled with cooling map info
670 * @np parameter and fills the read data into @__tbp data structure.
799 * thermal_of_populate_trip - parse and fill one trip point data
801 * @trip: trip point data structure to be filled up
804 * @np parameter and fills the read data into @trip data structure.
842 * thermal_of_build_thermal_zone - parse and fill one thermal zone data
846 * @np parameter and fills the read data into a __thermal_zone data structure
1034 * of_parse_thermal_zones - parse device tree thermal data
1037 * code to parse thermal data and populate the thermal framework