This commit adds boost frequency support in cpufreq core (Hardware &
+/*********************************************************************
* REGISTER / UNREGISTER CPUFREQ DRIVER *
*********************************************************************/
@@ -1936,6 +2019,16 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
cpufreq_driver = driver_data;
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
+ if (!cpufreq_driver->boost_supported)
+ boost.attr.mode = 0444;
+
+ ret = cpufreq_sysfs_create_file(&(boost.attr));
+ if (ret) {
+ pr_err("%s: cannot register global boost sysfs file\n",
+ __func__);
+ goto err_null_driver;
+ }
+
ret = subsys_interface_register(&cpufreq_interface);
if (ret)
goto err_null_driver;
@@ -1992,6 +2085,8 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
pr_debug("unregistering driver %s\n", driver->name);
subsys_interface_unregister(&cpufreq_interface);
+
+ cpufreq_sysfs_remove_file(&(boost.attr));
unregister_hotcpu_notifier(&cpufreq_cpu_notifier);