Lines Matching refs:tz

26 int get_tz_trend(struct thermal_zone_device *tz, int trip)  in get_tz_trend()  argument
30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend()
31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
32 if (tz->temperature > tz->last_temperature) in get_tz_trend()
34 else if (tz->temperature < tz->last_temperature) in get_tz_trend()
44 get_thermal_instance(struct thermal_zone_device *tz, in get_thermal_instance() argument
50 mutex_lock(&tz->lock); in get_thermal_instance()
53 list_for_each_entry(pos, &tz->thermal_instances, tz_node) { in get_thermal_instance()
54 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance()
61 mutex_unlock(&tz->lock); in get_thermal_instance()
81 int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) in __thermal_zone_get_temp() argument
88 lockdep_assert_held(&tz->lock); in __thermal_zone_get_temp()
90 ret = tz->ops->get_temp(tz, temp); in __thermal_zone_get_temp()
92 if (IS_ENABLED(CONFIG_THERMAL_EMULATION) && tz->emul_temperature) { in __thermal_zone_get_temp()
93 for (count = 0; count < tz->num_trips; count++) { in __thermal_zone_get_temp()
94 ret = __thermal_zone_get_trip(tz, count, &trip); in __thermal_zone_get_temp()
107 *temp = tz->emul_temperature; in __thermal_zone_get_temp()
123 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) in thermal_zone_get_temp() argument
127 if (IS_ERR_OR_NULL(tz)) in thermal_zone_get_temp()
130 mutex_lock(&tz->lock); in thermal_zone_get_temp()
132 if (!tz->ops->get_temp) { in thermal_zone_get_temp()
137 if (device_is_registered(&tz->device)) in thermal_zone_get_temp()
138 ret = __thermal_zone_get_temp(tz, temp); in thermal_zone_get_temp()
143 mutex_unlock(&tz->lock); in thermal_zone_get_temp()
167 instance->tz->id, instance->target); in __thermal_cdev_update()
203 int thermal_zone_get_slope(struct thermal_zone_device *tz) in thermal_zone_get_slope() argument
205 if (tz && tz->tzp) in thermal_zone_get_slope()
206 return tz->tzp->slope; in thermal_zone_get_slope()
218 int thermal_zone_get_offset(struct thermal_zone_device *tz) in thermal_zone_get_offset() argument
220 if (tz && tz->tzp) in thermal_zone_get_offset()
221 return tz->tzp->offset; in thermal_zone_get_offset()