Lines Matching refs:tz
34 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg) in for_each_thermal_zone() argument
38 if (!tz) in for_each_thermal_zone()
41 for (i = 0; tz[i].id != -1; i++) in for_each_thermal_zone()
42 ret |= cb(&tz[i], arg); in for_each_thermal_zone()
47 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz, in thermal_zone_find_by_name() argument
52 if (!tz || !name) in thermal_zone_find_by_name()
55 for (i = 0; tz[i].id != -1; i++) { in thermal_zone_find_by_name()
56 if (!strcmp(tz[i].name, name)) in thermal_zone_find_by_name()
57 return &tz[i]; in thermal_zone_find_by_name()
63 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id) in thermal_zone_find_by_id() argument
67 if (!tz || id < 0) in thermal_zone_find_by_id()
70 for (i = 0; tz[i].id != -1; i++) { in thermal_zone_find_by_id()
71 if (tz[i].id == id) in thermal_zone_find_by_id()
72 return &tz[i]; in thermal_zone_find_by_id()
78 static int __thermal_zone_discover(struct thermal_zone *tz, void *th) in __thermal_zone_discover() argument
80 if (thermal_cmd_get_trip(th, tz) < 0) in __thermal_zone_discover()
83 if (thermal_cmd_get_governor(th, tz)) in __thermal_zone_discover()
91 struct thermal_zone *tz; in thermal_zone_discover() local
93 if (thermal_cmd_get_tz(th, &tz) < 0) in thermal_zone_discover()
96 if (for_each_thermal_zone(tz, __thermal_zone_discover, th)) in thermal_zone_discover()
99 return tz; in thermal_zone_discover()