Release 4.7 drivers/cpufreq/dbx500-cpufreq.c
/*
* Copyright (C) STMicroelectronics 2009
* Copyright (C) ST-Ericsson SA 2010-2012
*
* License Terms: GNU General Public License v2
* Author: Sundar Iyer <sundar.iyer@stericsson.com>
* Author: Martin Persson <martin.persson@stericsson.com>
* Author: Jonas Aaberg <jonas.aberg@stericsson.com>
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/cpufreq.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
static struct cpufreq_frequency_table *freq_table;
static struct clk *armss_clk;
static int dbx500_cpufreq_target(struct cpufreq_policy *policy,
unsigned int index)
{
/* update armss clk frequency */
return clk_set_rate(armss_clk, freq_table[index].frequency * 1000);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin persson | martin persson | 16 | 51.61% | 1 | 16.67% |
viresh kumar | viresh kumar | 7 | 22.58% | 2 | 33.33% |
ulf hansson | ulf hansson | 4 | 12.90% | 1 | 16.67% |
jonas aberg | jonas aberg | 3 | 9.68% | 1 | 16.67% |
lee jones | lee jones | 1 | 3.23% | 1 | 16.67% |
| Total | 31 | 100.00% | 6 | 100.00% |
static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
{
policy->clk = armss_clk;
return cpufreq_generic_init(policy, freq_table, 20 * 1000);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin persson | martin persson | 18 | 62.07% | 1 | 20.00% |
viresh kumar | viresh kumar | 9 | 31.03% | 2 | 40.00% |
linus walleij | linus walleij | 1 | 3.45% | 1 | 20.00% |
lee jones | lee jones | 1 | 3.45% | 1 | 20.00% |
| Total | 29 | 100.00% | 5 | 100.00% |
static struct cpufreq_driver dbx500_cpufreq_driver = {
.flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS |
CPUFREQ_NEED_INITIAL_FREQ_CHECK,
.verify = cpufreq_generic_frequency_table_verify,
.target_index = dbx500_cpufreq_target,
.get = cpufreq_generic_get,
.init = dbx500_cpufreq_init,
.name = "DBX500",
.attr = cpufreq_generic_attr,
};
static int dbx500_cpufreq_probe(struct platform_device *pdev)
{
struct cpufreq_frequency_table *pos;
freq_table = dev_get_platdata(&pdev->dev);
if (!freq_table) {
pr_err("dbx500-cpufreq: Failed to fetch cpufreq table\n");
return -ENODEV;
}
armss_clk = clk_get(&pdev->dev, "armss");
if (IS_ERR(armss_clk)) {
pr_err("dbx500-cpufreq: Failed to get armss clk\n");
return PTR_ERR(armss_clk);
}
pr_info("dbx500-cpufreq: Available frequencies:\n");
cpufreq_for_each_entry(pos, freq_table)
pr_info(" %d Mhz\n", pos->frequency / 1000);
return cpufreq_register_driver(&dbx500_cpufreq_driver);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ulf hansson | ulf hansson | 86 | 83.50% | 3 | 50.00% |
stratos karafotis | stratos karafotis | 12 | 11.65% | 1 | 16.67% |
lee jones | lee jones | 3 | 2.91% | 1 | 16.67% |
jonas aberg | jonas aberg | 2 | 1.94% | 1 | 16.67% |
| Total | 103 | 100.00% | 6 | 100.00% |
static struct platform_driver dbx500_cpufreq_plat_driver = {
.driver = {
.name = "cpufreq-ux500",
},
.probe = dbx500_cpufreq_probe,
};
static int __init dbx500_cpufreq_register(void)
{
return platform_driver_register(&dbx500_cpufreq_plat_driver);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin persson | martin persson | 12 | 75.00% | 1 | 25.00% |
lee jones | lee jones | 2 | 12.50% | 1 | 25.00% |
linus walleij | linus walleij | 1 | 6.25% | 1 | 25.00% |
ulf hansson | ulf hansson | 1 | 6.25% | 1 | 25.00% |
| Total | 16 | 100.00% | 4 | 100.00% |
device_initcall(dbx500_cpufreq_register);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("cpufreq driver for DBX500");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
ulf hansson | ulf hansson | 133 | 44.93% | 4 | 23.53% |
martin persson | martin persson | 99 | 33.45% | 1 | 5.88% |
viresh kumar | viresh kumar | 22 | 7.43% | 6 | 35.29% |
lee jones | lee jones | 17 | 5.74% | 2 | 11.76% |
stratos karafotis | stratos karafotis | 12 | 4.05% | 1 | 5.88% |
linus walleij | linus walleij | 6 | 2.03% | 1 | 5.88% |
jonas aberg | jonas aberg | 5 | 1.69% | 1 | 5.88% |
fabio baltieri | fabio baltieri | 2 | 0.68% | 1 | 5.88% |
| Total | 296 | 100.00% | 17 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.