Lines Matching full:th

9 int for_each_thermal_threshold(struct thermal_threshold *th, cb_th_t cb, void *arg)  in for_each_thermal_threshold()  argument
13 if (!th) in for_each_thermal_threshold()
16 for (i = 0; th[i].temperature != INT_MAX; i++) in for_each_thermal_threshold()
17 ret |= cb(&th[i], arg); in for_each_thermal_threshold()
92 static int __thermal_zone_discover(struct thermal_zone *tz, void *th) in __thermal_zone_discover() argument
94 if (thermal_cmd_get_trip(th, tz) < 0) in __thermal_zone_discover()
97 if (thermal_cmd_threshold_get(th, tz)) in __thermal_zone_discover()
100 if (thermal_cmd_get_governor(th, tz)) in __thermal_zone_discover()
106 struct thermal_zone *thermal_zone_discover(struct thermal_handler *th) in thermal_zone_discover() argument
110 if (thermal_cmd_get_tz(th, &tz) < 0) in thermal_zone_discover()
113 if (for_each_thermal_zone(tz, __thermal_zone_discover, th)) in thermal_zone_discover()
119 void thermal_exit(struct thermal_handler *th) in thermal_exit() argument
121 thermal_cmd_exit(th); in thermal_exit()
122 thermal_events_exit(th); in thermal_exit()
123 thermal_sampling_exit(th); in thermal_exit()
125 free(th); in thermal_exit()
130 struct thermal_handler *th; in thermal_init() local
132 th = malloc(sizeof(*th)); in thermal_init()
133 if (!th) in thermal_init()
135 th->ops = ops; in thermal_init()
137 if (thermal_events_init(th)) in thermal_init()
140 if (thermal_sampling_init(th)) in thermal_init()
143 if (thermal_cmd_init(th)) in thermal_init()
146 return th; in thermal_init()
149 free(th); in thermal_init()