drivers/cpufreq/mediatek-cpufreq.c
Source file repositories/reference/linux-study-clean/drivers/cpufreq/mediatek-cpufreq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/cpufreq/mediatek-cpufreq.c- Extension
.c- Size
- 21719 bytes
- Lines
- 808
- Domain
- Driver Families
- Bucket
- drivers/cpufreq
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/cpu.hlinux/cpufreq.hlinux/cpumask.hlinux/minmax.hlinux/module.hlinux/of.hlinux/of_platform.hlinux/platform_device.hlinux/pm_opp.hlinux/regulator/consumer.h
Detected Declarations
struct mtk_cpufreq_platform_datastruct mtk_cpu_dvfs_infofunction list_for_each_entryfunction mtk_cpufreq_voltage_trackingfunction mtk_cpufreq_set_voltagefunction is_ccifreq_readyfunction mtk_cpufreq_set_targetfunction mtk_cpufreq_opp_notifierfunction mtk_cpu_dvfs_info_initfunction mtk_cpu_dvfs_info_releasefunction mtk_cpufreq_initfunction mtk_cpufreq_exitfunction mtk_cpufreq_probefunction for_each_present_cpufunction mtk_cpufreq_driver_initfunction mtk_cpufreq_driver_exitmodule init mtk_cpufreq_driver_init
Annotated Snippet
module_init(mtk_cpufreq_driver_init)
static void __exit mtk_cpufreq_driver_exit(void)
{
platform_device_unregister(cpufreq_pdev);
platform_driver_unregister(&mtk_cpufreq_platdrv);
}
module_exit(mtk_cpufreq_driver_exit)
MODULE_DESCRIPTION("MediaTek CPUFreq driver");
MODULE_AUTHOR("Pi-Cheng Chen <pi-cheng.chen@linaro.org>");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/cpu.h`, `linux/cpufreq.h`, `linux/cpumask.h`, `linux/minmax.h`, `linux/module.h`, `linux/of.h`, `linux/of_platform.h`.
- Detected declarations: `struct mtk_cpufreq_platform_data`, `struct mtk_cpu_dvfs_info`, `function list_for_each_entry`, `function mtk_cpufreq_voltage_tracking`, `function mtk_cpufreq_set_voltage`, `function is_ccifreq_ready`, `function mtk_cpufreq_set_target`, `function mtk_cpufreq_opp_notifier`, `function mtk_cpu_dvfs_info_init`, `function mtk_cpu_dvfs_info_release`.
- Atlas domain: Driver Families / drivers/cpufreq.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.