Lines Matching full:tz
48 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg)
52 if (!tz)
55 for (i = 0; tz[i].id != -1; i++)
56 ret |= cb(&tz[i], arg);
61 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz,
66 if (!tz || !name)
69 for (i = 0; tz[i].id != -1; i++) {
70 if (!strcmp(tz[i].name, name))
71 return &tz[i];
77 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id)
81 if (!tz || id < 0)
84 for (i = 0; tz[i].id != -1; i++) {
85 if (tz[i].id == id)
86 return &tz[i];
92 static int __thermal_zone_discover(struct thermal_zone *tz, void *th)
94 if (thermal_cmd_get_trip(th, tz) < 0)
97 if (thermal_cmd_threshold_get(th, tz))
100 if (thermal_cmd_get_governor(th, tz))
108 struct thermal_zone *tz;
110 if (thermal_cmd_get_tz(th, &tz) < 0)
113 if (for_each_thermal_zone(tz, __thermal_zone_discover, th))
116 return tz;