drivers/devfreq/event/exynos-ppmu.c
Source file repositories/reference/linux-study-clean/drivers/devfreq/event/exynos-ppmu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/devfreq/event/exynos-ppmu.c- Extension
.c- Size
- 16866 bytes
- Lines
- 715
- Domain
- Driver Families
- Bucket
- drivers/devfreq
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/io.hlinux/kernel.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/property.hlinux/regmap.hlinux/suspend.hlinux/devfreq-event.hexynos-ppmu.h
Detected Declarations
struct exynos_ppmu_datastruct exynos_ppmuenum exynos_ppmu_typefunction __exynos_ppmu_find_ppmu_idfunction exynos_ppmu_find_ppmu_idfunction exynos_ppmu_disablefunction exynos_ppmu_set_eventfunction exynos_ppmu_get_eventfunction exynos_ppmu_v2_disablefunction exynos_ppmu_v2_set_eventfunction exynos_ppmu_v2_get_eventfunction of_get_devfreq_eventsfunction exynos_ppmu_parse_dtfunction exynos_ppmu_probefunction exynos_ppmu_remove
Annotated Snippet
struct exynos_ppmu_data {
struct clk *clk;
};
struct exynos_ppmu {
struct devfreq_event_dev **edev;
struct devfreq_event_desc *desc;
unsigned int num_events;
struct device *dev;
struct regmap *regmap;
struct exynos_ppmu_data ppmu;
enum exynos_ppmu_type ppmu_type;
};
#define PPMU_EVENT(name) \
{ "ppmu-event0-"#name, PPMU_PMNCNT0 }, \
{ "ppmu-event1-"#name, PPMU_PMNCNT1 }, \
{ "ppmu-event2-"#name, PPMU_PMNCNT2 }, \
{ "ppmu-event3-"#name, PPMU_PMNCNT3 }
static struct __exynos_ppmu_events {
char *name;
int id;
} ppmu_events[] = {
/* For Exynos3250, Exynos4 and Exynos5260 */
PPMU_EVENT(g3d),
PPMU_EVENT(fsys),
/* For Exynos4 SoCs and Exynos3250 */
PPMU_EVENT(dmc0),
PPMU_EVENT(dmc1),
PPMU_EVENT(cpu),
PPMU_EVENT(rightbus),
PPMU_EVENT(leftbus),
PPMU_EVENT(lcd0),
PPMU_EVENT(camif),
/* Only for Exynos3250 and Exynos5260 */
PPMU_EVENT(mfc),
/* Only for Exynos4 SoCs */
PPMU_EVENT(mfc-left),
PPMU_EVENT(mfc-right),
/* Only for Exynos5260 SoCs */
PPMU_EVENT(drex0-s0),
PPMU_EVENT(drex0-s1),
PPMU_EVENT(drex1-s0),
PPMU_EVENT(drex1-s1),
PPMU_EVENT(eagle),
PPMU_EVENT(kfc),
PPMU_EVENT(isp),
PPMU_EVENT(fimc),
PPMU_EVENT(gscl),
PPMU_EVENT(mscl),
PPMU_EVENT(fimd0x),
PPMU_EVENT(fimd1x),
/* Only for Exynos5433 SoCs */
PPMU_EVENT(d0-cpu),
PPMU_EVENT(d0-general),
PPMU_EVENT(d0-rt),
PPMU_EVENT(d1-cpu),
PPMU_EVENT(d1-general),
PPMU_EVENT(d1-rt),
/* For Exynos5422 SoC, deprecated (backwards compatible) */
PPMU_EVENT(dmc0_0),
PPMU_EVENT(dmc0_1),
PPMU_EVENT(dmc1_0),
PPMU_EVENT(dmc1_1),
/* For Exynos5422 SoC */
PPMU_EVENT(dmc0-0),
PPMU_EVENT(dmc0-1),
PPMU_EVENT(dmc1-0),
PPMU_EVENT(dmc1-1),
};
static int __exynos_ppmu_find_ppmu_id(const char *edev_name)
{
int i;
for (i = 0; i < ARRAY_SIZE(ppmu_events); i++)
if (!strcmp(edev_name, ppmu_events[i].name))
return ppmu_events[i].id;
return -EINVAL;
}
Annotation
- Immediate include surface: `linux/clk.h`, `linux/io.h`, `linux/kernel.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/property.h`, `linux/regmap.h`.
- Detected declarations: `struct exynos_ppmu_data`, `struct exynos_ppmu`, `enum exynos_ppmu_type`, `function __exynos_ppmu_find_ppmu_id`, `function exynos_ppmu_find_ppmu_id`, `function exynos_ppmu_disable`, `function exynos_ppmu_set_event`, `function exynos_ppmu_get_event`, `function exynos_ppmu_v2_disable`, `function exynos_ppmu_v2_set_event`.
- Atlas domain: Driver Families / drivers/devfreq.
- Implementation status: source implementation candidate.
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.