• Home
  • Raw
  • Download

Lines Matching full:tz

87 static int of_thermal_get_temp(struct thermal_zone_device *tz,  in of_thermal_get_temp()  argument
90 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp()
98 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument
101 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips()
112 * @tz: pointer to a thermal zone
119 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument
121 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips()
133 * @tz: pointer to a thermal zone
140 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
142 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid()
155 * @tz: pointer to a thermal zone
162 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument
164 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points()
176 * @tz: pointer to a thermal zone
184 static int of_thermal_set_emul_temp(struct thermal_zone_device *tz, in of_thermal_set_emul_temp() argument
187 struct __thermal_zone *data = tz->devdata; in of_thermal_set_emul_temp()
195 static int of_thermal_get_trend(struct thermal_zone_device *tz, int trip, in of_thermal_get_trend() argument
198 struct __thermal_zone *data = tz->devdata; 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
276 struct __thermal_zone *data = tz->devdata; 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
289 struct __thermal_zone *data = tz->devdata; 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
302 struct __thermal_zone *data = tz->devdata; 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
324 struct __thermal_zone *data = tz->devdata; 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
337 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trip_hyst()
348 static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, in of_thermal_get_crit_temp() argument
351 struct __thermal_zone *data = tz->devdata; in of_thermal_get_crit_temp()
383 struct __thermal_zone *tz; in thermal_zone_of_add_sensor() local
389 tz = tzd->devdata; in thermal_zone_of_add_sensor()
395 tz->ops = ops; in thermal_zone_of_add_sensor()
396 tz->sensor_data = data; in thermal_zone_of_add_sensor()
554 struct __thermal_zone *tz; in thermal_zone_of_sensor_unregister() local
559 tz = tzd->devdata; in thermal_zone_of_sensor_unregister()
562 if (!tz) in thermal_zone_of_sensor_unregister()
573 tz->ops = NULL; in thermal_zone_of_sensor_unregister()
574 tz->sensor_data = NULL; in thermal_zone_of_sensor_unregister()
859 struct __thermal_zone *tz; in thermal_of_build_thermal_zone() local
868 tz = kzalloc(sizeof(*tz), GFP_KERNEL); in thermal_of_build_thermal_zone()
869 if (!tz) in thermal_of_build_thermal_zone()
877 tz->passive_delay = prop; in thermal_of_build_thermal_zone()
884 tz->polling_delay = prop; in thermal_of_build_thermal_zone()
893 tz->slope = coef[0]; in thermal_of_build_thermal_zone()
894 tz->offset = coef[1]; in thermal_of_build_thermal_zone()
896 tz->slope = 1; in thermal_of_build_thermal_zone()
897 tz->offset = 0; in thermal_of_build_thermal_zone()
907 tz->ntrips = of_get_child_count(child); in thermal_of_build_thermal_zone()
908 if (tz->ntrips == 0) /* must have at least one child */ in thermal_of_build_thermal_zone()
911 tz->trips = kcalloc(tz->ntrips, sizeof(*tz->trips), GFP_KERNEL); in thermal_of_build_thermal_zone()
912 if (!tz->trips) { in thermal_of_build_thermal_zone()
919 ret = thermal_of_populate_trip(gchild, &tz->trips[i++]); in thermal_of_build_thermal_zone()
933 tz->num_tbps = of_get_child_count(child); in thermal_of_build_thermal_zone()
934 if (tz->num_tbps == 0) in thermal_of_build_thermal_zone()
937 tz->tbps = kcalloc(tz->num_tbps, sizeof(*tz->tbps), GFP_KERNEL); in thermal_of_build_thermal_zone()
938 if (!tz->tbps) { in thermal_of_build_thermal_zone()
945 ret = thermal_of_populate_bind_params(gchild, &tz->tbps[i++], in thermal_of_build_thermal_zone()
946 tz->trips, tz->ntrips); in thermal_of_build_thermal_zone()
954 return tz; in thermal_of_build_thermal_zone()
958 struct __thermal_bind_params *tbp = tz->tbps + i; in thermal_of_build_thermal_zone()
967 kfree(tz->tbps); in thermal_of_build_thermal_zone()
969 for (i = 0; i < tz->ntrips; i++) in thermal_of_build_thermal_zone()
970 of_node_put(tz->trips[i].np); in thermal_of_build_thermal_zone()
971 kfree(tz->trips); in thermal_of_build_thermal_zone()
974 kfree(tz); in thermal_of_build_thermal_zone()
980 static __init void of_thermal_free_zone(struct __thermal_zone *tz) in of_thermal_free_zone() argument
985 for (i = 0; i < tz->num_tbps; i++) { in of_thermal_free_zone()
986 tbp = tz->tbps + i; in of_thermal_free_zone()
994 kfree(tz->tbps); in of_thermal_free_zone()
995 for (i = 0; i < tz->ntrips; i++) in of_thermal_free_zone()
996 of_node_put(tz->trips[i].np); in of_thermal_free_zone()
997 kfree(tz->trips); in of_thermal_free_zone()
998 kfree(tz); in of_thermal_free_zone()
1048 struct __thermal_zone *tz; in of_parse_thermal_zones() local
1063 tz = thermal_of_build_thermal_zone(child); in of_parse_thermal_zones()
1064 if (IS_ERR(tz)) { in of_parse_thermal_zones()
1067 PTR_ERR(tz)); in of_parse_thermal_zones()
1087 for (i = 0; i < tz->ntrips; i++) in of_parse_thermal_zones()
1091 tzp->slope = tz->slope; in of_parse_thermal_zones()
1092 tzp->offset = tz->offset; in of_parse_thermal_zones()
1094 zone = thermal_zone_device_register(child->name, tz->ntrips, in of_parse_thermal_zones()
1095 mask, tz, in of_parse_thermal_zones()
1097 tz->passive_delay, in of_parse_thermal_zones()
1098 tz->polling_delay); in of_parse_thermal_zones()
1104 of_thermal_free_zone(tz); in of_parse_thermal_zones()
1115 of_thermal_free_zone(tz); in of_parse_thermal_zones()