Lines Matching full:governor
704 * cpufreq_parse_governor - parse a governor string only for has_target()
705 * @str_governor: Governor name.
806 else if (policy->governor) in show_scaling_governor()
808 policy->governor->name); in show_scaling_governor()
926 if (!policy->governor || !policy->governor->store_setspeed) in store_scaling_setspeed()
933 policy->governor->store_setspeed(policy, freq); in store_scaling_setspeed()
940 if (!policy->governor || !policy->governor->show_setspeed) in show_scaling_setspeed()
943 return policy->governor->show_setspeed(policy, buf); in show_scaling_setspeed()
1113 /* Update policy governor to the one used before hotplug. */ in cpufreq_init_policy()
1116 pr_debug("Restoring governor %s for cpu %d\n", in cpufreq_init_policy()
1135 * In case the default governor is neither "performance" in cpufreq_init_policy()
1171 pr_err("%s: Failed to start governor\n", __func__); in cpufreq_add_policy_cpu()
1182 cpufreq_set_policy(policy, policy->governor, policy->policy); in refresh_frequency_limits()
1391 policy->governor = NULL; in cpufreq_online()
1649 /* Start the governor again for the active policy. */ in __cpufreq_offline()
1653 pr_err("%s: Failed to start governor\n", __func__); in __cpufreq_offline()
1660 strncpy(policy->last_governor, policy->governor->name, in __cpufreq_offline()
2011 pr_err("%s: Failed to start governor for CPU%u's policy\n", in cpufreq_resume()
2396 /* Don't start any governor operations if we are entering suspend */ in cpufreq_init_governor()
2400 * Governor might not be initiated here if ACPI _PPC changed in cpufreq_init_governor()
2403 if (!policy->governor) in cpufreq_init_governor()
2407 if (policy->governor->flags & CPUFREQ_GOV_DYNAMIC_SWITCHING && in cpufreq_init_governor()
2412 pr_warn("Can't use %s governor as dynamic switching is disallowed. Fallback to %s governor\n", in cpufreq_init_governor()
2413 policy->governor->name, gov->name); in cpufreq_init_governor()
2414 policy->governor = gov; in cpufreq_init_governor()
2420 if (!try_module_get(policy->governor->owner)) in cpufreq_init_governor()
2425 if (policy->governor->init) { in cpufreq_init_governor()
2426 ret = policy->governor->init(policy); in cpufreq_init_governor()
2428 module_put(policy->governor->owner); in cpufreq_init_governor()
2433 policy->strict_target = !!(policy->governor->flags & CPUFREQ_GOV_STRICT_TARGET); in cpufreq_init_governor()
2440 if (cpufreq_suspended || !policy->governor) in cpufreq_exit_governor()
2445 if (policy->governor->exit) in cpufreq_exit_governor()
2446 policy->governor->exit(policy); in cpufreq_exit_governor()
2448 module_put(policy->governor->owner); in cpufreq_exit_governor()
2458 if (!policy->governor) in cpufreq_start_governor()
2466 if (policy->governor->start) { in cpufreq_start_governor()
2467 ret = policy->governor->start(policy); in cpufreq_start_governor()
2472 if (policy->governor->limits) in cpufreq_start_governor()
2473 policy->governor->limits(policy); in cpufreq_start_governor()
2480 if (cpufreq_suspended || !policy->governor) in cpufreq_stop_governor()
2485 if (policy->governor->stop) in cpufreq_stop_governor()
2486 policy->governor->stop(policy); in cpufreq_stop_governor()
2491 if (cpufreq_suspended || !policy->governor) in cpufreq_governor_limits()
2496 if (policy->governor->limits) in cpufreq_governor_limits()
2497 policy->governor->limits(policy); in cpufreq_governor_limits()
2500 int cpufreq_register_governor(struct cpufreq_governor *governor) in cpufreq_register_governor() argument
2504 if (!governor) in cpufreq_register_governor()
2513 if (!find_governor(governor->name)) { in cpufreq_register_governor()
2515 list_add(&governor->governor_list, &cpufreq_governor_list); in cpufreq_register_governor()
2523 void cpufreq_unregister_governor(struct cpufreq_governor *governor) in cpufreq_unregister_governor() argument
2528 if (!governor) in cpufreq_unregister_governor()
2537 if (!strcmp(policy->last_governor, governor->name)) { in cpufreq_unregister_governor()
2538 policy->governor = NULL; in cpufreq_unregister_governor()
2545 list_del(&governor->governor_list); in cpufreq_unregister_governor()
2583 * @new_gov: Policy governor pointer.
2589 * carry out a governor update for @policy. That is, run the current governor's
2591 * @policy) or replace the governor for @policy with @new_gov.
2646 if (new_gov == policy->governor) { in cpufreq_set_policy()
2647 pr_debug("governor limits update\n"); in cpufreq_set_policy()
2652 pr_debug("governor switch\n"); in cpufreq_set_policy()
2655 old_gov = policy->governor; in cpufreq_set_policy()
2656 /* end old governor */ in cpufreq_set_policy()
2662 /* start new governor */ in cpufreq_set_policy()
2663 policy->governor = new_gov; in cpufreq_set_policy()
2668 pr_debug("governor change\n"); in cpufreq_set_policy()
2675 /* new governor failed, so re-start old one */ in cpufreq_set_policy()
2676 pr_debug("starting governor %s failed\n", policy->governor->name); in cpufreq_set_policy()
2678 policy->governor = old_gov; in cpufreq_set_policy()
2680 policy->governor = NULL; in cpufreq_set_policy()