Files
android/drivers/cpufreq/dummy-cpufreq.c
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

60 lines
1.3 KiB
C

// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Google, Inc.
*/
#include <linux/cpufreq.h>
#include <linux/module.h>
static struct cpufreq_frequency_table freq_table[] = {
{ .frequency = 1 },
{ .frequency = 2 },
{ .frequency = CPUFREQ_TABLE_END },
};
static int dummy_cpufreq_target_index(struct cpufreq_policy *policy,
unsigned int index)
{
return 0;
}
static int dummy_cpufreq_driver_init(struct cpufreq_policy *policy)
{
return cpufreq_table_validate_and_show(policy, freq_table);
}
static unsigned int dummy_cpufreq_get(unsigned int cpu)
{
return 1;
}
static int dummy_cpufreq_verify(struct cpufreq_policy *policy)
{
return 0;
}
static struct cpufreq_driver dummy_cpufreq_driver = {
.name = "dummy",
.target_index = dummy_cpufreq_target_index,
.init = dummy_cpufreq_driver_init,
.get = dummy_cpufreq_get,
.verify = dummy_cpufreq_verify,
.attr = cpufreq_generic_attr,
};
static int __init dummy_cpufreq_init(void)
{
return cpufreq_register_driver(&dummy_cpufreq_driver);
}
static void __exit dummy_cpufreq_exit(void)
{
cpufreq_unregister_driver(&dummy_cpufreq_driver);
}
module_init(dummy_cpufreq_init);
module_exit(dummy_cpufreq_exit);
MODULE_AUTHOR("Connor O'Brien <connoro@google.com>");
MODULE_DESCRIPTION("dummy cpufreq driver");
MODULE_LICENSE("GPL");