drivers/clk/ti/clockdomain.c
Source file repositories/reference/linux-study-clean/drivers/clk/ti/clockdomain.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/ti/clockdomain.c- Extension
.c- Size
- 4732 bytes
- Lines
- 173
- Domain
- Driver Families
- Bucket
- drivers/clk
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/clk-provider.hlinux/slab.hlinux/of.hlinux/of_address.hlinux/clk/ti.hclock.h
Detected Declarations
function clkdm_clk_enablefunction omap2_clkops_disable_clkdmfunction clk_registerfunction of_ti_clockdomain_setupfunction ti_dt_clockdomains_setup
Annotated Snippet
if (IS_ERR(clk)) {
pr_err("%s: Failed get %pOF' clock nr %d (%ld)\n",
__func__, node, i, PTR_ERR(clk));
continue;
}
clk_hw = __clk_get_hw(clk);
if (!omap2_clk_is_hw_omap(clk_hw)) {
pr_warn("can't setup clkdm for basic clk %s\n",
__clk_get_name(clk));
clk_put(clk);
continue;
}
to_clk_hw_omap(clk_hw)->clkdm_name = clkdm_name;
omap2_init_clk_clkdm(clk_hw);
clk_put(clk);
}
}
static const struct of_device_id ti_clkdm_match_table[] __initconst = {
{ .compatible = "ti,clockdomain" },
{ }
};
/**
* ti_dt_clockdomains_setup - setup device tree clockdomains
*
* Initializes clockdomain nodes for a SoC. This parses through all the
* nodes with compatible = "ti,clockdomain", and add the clockdomain
* info for all the clocks listed under these. This function shall be
* called after rest of the DT clock init has completed and all
* clock nodes have been registered.
*/
void __init ti_dt_clockdomains_setup(void)
{
struct device_node *np;
for_each_matching_node(np, ti_clkdm_match_table) {
of_ti_clockdomain_setup(np);
}
}
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clk-provider.h`, `linux/slab.h`, `linux/of.h`, `linux/of_address.h`, `linux/clk/ti.h`, `clock.h`.
- Detected declarations: `function clkdm_clk_enable`, `function omap2_clkops_disable_clkdm`, `function clk_register`, `function of_ti_clockdomain_setup`, `function ti_dt_clockdomains_setup`.
- Atlas domain: Driver Families / drivers/clk.
- 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.