drivers/base/power/clock_ops.c
Source file repositories/reference/linux-study-clean/drivers/base/power/clock_ops.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/base/power/clock_ops.c- Extension
.c- Size
- 18011 bytes
- Lines
- 733
- Domain
- Driver Families
- Bucket
- drivers/base
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/kernel.hlinux/device.hlinux/io.hlinux/pm.hlinux/pm_clock.hlinux/clk.hlinux/clkdev.hlinux/of_clk.hlinux/slab.hlinux/err.hlinux/pm_domain.hlinux/pm_runtime.h
Detected Declarations
struct pm_clock_entryenum pce_statusfunction pm_clk_suspendfunction pm_clk_list_lockfunction pm_clk_op_lockfunction __pm_clk_enablefunction pm_clk_acquirefunction __pm_clk_addfunction pm_clk_addfunction clk_putfunction of_pm_clk_add_clksfunction __pm_clk_removefunction pm_clk_remove_clkfunction list_for_each_entryfunction pm_clk_initfunction pm_clk_createfunction pm_clk_destroyfunction list_for_each_entry_safe_reversefunction pm_clk_destroy_actionfunction devm_pm_clk_createfunction pm_clk_suspendfunction list_for_each_entry_reversefunction pm_clk_resumefunction pm_clk_notifyfunction pm_clk_runtime_suspendfunction pm_clk_runtime_resumefunction enable_clockfunction disable_clockfunction pm_clk_notifyfunction pm_clk_notifyexport pm_clk_addexport pm_clk_add_clkexport of_pm_clk_add_clksexport pm_clk_remove_clkexport pm_clk_initexport pm_clk_createexport pm_clk_destroyexport devm_pm_clk_createexport pm_clk_suspendexport pm_clk_resumeexport pm_clk_runtime_suspendexport pm_clk_runtime_resumeexport pm_clk_add_notifier
Annotated Snippet
void pm_clk_add_notifier(const struct bus_type *bus,
struct pm_clk_notifier_block *clknb)
{
if (!bus || !clknb)
return;
clknb->nb.notifier_call = pm_clk_notify;
bus_register_notifier(bus, &clknb->nb);
}
EXPORT_SYMBOL_GPL(pm_clk_add_notifier);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/device.h`, `linux/io.h`, `linux/pm.h`, `linux/pm_clock.h`, `linux/clk.h`, `linux/clkdev.h`, `linux/of_clk.h`.
- Detected declarations: `struct pm_clock_entry`, `enum pce_status`, `function pm_clk_suspend`, `function pm_clk_list_lock`, `function pm_clk_op_lock`, `function __pm_clk_enable`, `function pm_clk_acquire`, `function __pm_clk_add`, `function pm_clk_add`, `function clk_put`.
- Atlas domain: Driver Families / drivers/base.
- Implementation status: pattern 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.