Lines Matching refs:governor
92 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
93 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
96 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
97 tz->governor = NULL; in bind_previous_governor()
116 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor()
117 tz->governor->unbind_from_tz(tz); in thermal_set_governor()
128 tz->governor = new_gov; in thermal_set_governor()
133 int thermal_register_governor(struct thermal_governor *governor) in thermal_register_governor() argument
139 if (!governor) in thermal_register_governor()
145 if (__find_governor(governor->name) == NULL) { in thermal_register_governor()
147 list_add(&governor->governor_list, &thermal_governor_list); in thermal_register_governor()
148 if (!def_governor && !strncmp(governor->name, in thermal_register_governor()
150 def_governor = governor; in thermal_register_governor()
160 if (pos->governor) in thermal_register_governor()
165 if (!strncasecmp(name, governor->name, THERMAL_NAME_LENGTH)) { in thermal_register_governor()
168 ret = thermal_set_governor(pos, governor); in thermal_register_governor()
172 governor->name, pos->type, ret); in thermal_register_governor()
182 void thermal_unregister_governor(struct thermal_governor *governor) in thermal_unregister_governor() argument
186 if (!governor) in thermal_unregister_governor()
191 if (__find_governor(governor->name) == NULL) in thermal_unregister_governor()
197 if (!strncasecmp(pos->governor->name, governor->name, in thermal_unregister_governor()
203 list_del(&governor->governor_list); in thermal_unregister_governor()
425 tz->governor ? tz->governor->throttle(tz, trip) : in handle_non_critical_trips()
868 return sprintf(buf, "%s\n", tz->governor->name); in policy_show()
1807 struct thermal_governor *governor; in thermal_zone_device_register() local
1917 governor = __find_governor(tz->tzp->governor_name); in thermal_zone_device_register()
1919 governor = def_governor; in thermal_zone_device_register()
1921 result = thermal_set_governor(tz, governor); in thermal_zone_device_register()