cregit-Linux how code gets into the kernel

Release 4.11 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 Persson1651.61%116.67%
Viresh Kumar722.58%233.33%
Ulf Hansson412.90%116.67%
Jonas Aaberg39.68%116.67%
Lee 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 Persson1862.07%120.00%
Viresh Kumar931.03%240.00%
Lee Jones13.45%120.00%
Linus Walleij13.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 Hansson8683.50%350.00%
Stratos Karafotis1211.65%116.67%
Lee Jones32.91%116.67%
Jonas Aaberg21.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 Persson1275.00%125.00%
Lee Jones212.50%125.00%
Linus Walleij16.25%125.00%
Ulf 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 Hansson13344.93%423.53%
Martin Persson9933.45%15.88%
Viresh Kumar227.43%635.29%
Lee Jones175.74%211.76%
Stratos Karafotis124.05%15.88%
Linus Walleij62.03%15.88%
Jonas Aaberg51.69%15.88%
Fabio 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.
Created with cregit.