cregit-Linux how code gets into the kernel

Release 4.7 drivers/cpufreq/dbx500-cpufreq.c

Directory: drivers/cpufreq
/*
 * 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

PersonTokensPropCommitsCommitProp
martin perssonmartin persson1651.61%116.67%
viresh kumarviresh kumar722.58%233.33%
ulf hanssonulf hansson412.90%116.67%
jonas abergjonas aberg39.68%116.67%
lee joneslee jones13.23%116.67%
Total31100.00%6100.00%


static int dbx500_cpufreq_init(struct cpufreq_policy *policy) { policy->clk = armss_clk; return cpufreq_generic_init(policy, freq_table, 20 * 1000); }

Contributors

PersonTokensPropCommitsCommitProp
martin perssonmartin persson1862.07%120.00%
viresh kumarviresh kumar931.03%240.00%
linus walleijlinus walleij13.45%120.00%
lee joneslee jones13.45%120.00%
Total29100.00%5100.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

PersonTokensPropCommitsCommitProp
ulf hanssonulf hansson8683.50%350.00%
stratos karafotisstratos karafotis1211.65%116.67%
lee joneslee jones32.91%116.67%
jonas abergjonas aberg21.94%116.67%
Total103100.00%6100.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

PersonTokensPropCommitsCommitProp
martin perssonmartin persson1275.00%125.00%
lee joneslee jones212.50%125.00%
linus walleijlinus walleij16.25%125.00%
ulf hanssonulf hansson16.25%125.00%
Total16100.00%4100.00%

device_initcall(dbx500_cpufreq_register); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("cpufreq driver for DBX500");

Overall Contributors

PersonTokensPropCommitsCommitProp
ulf hanssonulf hansson13344.93%423.53%
martin perssonmartin persson9933.45%15.88%
viresh kumarviresh kumar227.43%635.29%
lee joneslee jones175.74%211.76%
stratos karafotisstratos karafotis124.05%15.88%
linus walleijlinus walleij62.03%15.88%
jonas abergjonas aberg51.69%15.88%
fabio baltierifabio baltieri20.68%15.88%
Total296100.00%17100.00%
Directory: drivers/cpufreq
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}