drivers/clk/qcom/clk-hfpll.c
Source file repositories/reference/linux-study-clean/drivers/clk/qcom/clk-hfpll.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/qcom/clk-hfpll.c- Extension
.c- Size
- 6211 bytes
- Lines
- 254
- Domain
- Driver Families
- Bucket
- drivers/clk
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/export.hlinux/regmap.hlinux/delay.hlinux/err.hlinux/clk-provider.hlinux/spinlock.hclk-regmap.hclk-hfpll.h
Detected Declarations
function __clk_hfpll_init_oncefunction __clk_hfpll_enablefunction clk_hfpll_enablefunction __clk_hfpll_disablefunction clk_hfpll_disablefunction clk_hfpll_determine_ratefunction clk_hfpll_set_ratefunction clk_hfpll_recalc_ratefunction clk_hfpll_initfunction hfpll_is_enabledexport clk_ops_hfpll
Annotated Snippet
if (!(status & BIT(hd->lock_bit))) {
WARN(1, "HFPLL %s is ON, but not locked!\n",
__clk_get_name(hw->clk));
clk_hfpll_disable(hw);
__clk_hfpll_init_once(hw);
}
}
return 0;
}
static int hfpll_is_enabled(struct clk_hw *hw)
{
struct clk_hfpll *h = to_clk_hfpll(hw);
struct hfpll_data const *hd = h->d;
struct regmap *regmap = h->clkr.regmap;
u32 mode;
regmap_read(regmap, hd->mode_reg, &mode);
mode &= 0x7;
return mode == (PLL_BYPASSNL | PLL_RESET_N | PLL_OUTCTRL);
}
const struct clk_ops clk_ops_hfpll = {
.enable = clk_hfpll_enable,
.disable = clk_hfpll_disable,
.is_enabled = hfpll_is_enabled,
.determine_rate = clk_hfpll_determine_rate,
.set_rate = clk_hfpll_set_rate,
.recalc_rate = clk_hfpll_recalc_rate,
.init = clk_hfpll_init,
};
EXPORT_SYMBOL_GPL(clk_ops_hfpll);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/export.h`, `linux/regmap.h`, `linux/delay.h`, `linux/err.h`, `linux/clk-provider.h`, `linux/spinlock.h`, `clk-regmap.h`.
- Detected declarations: `function __clk_hfpll_init_once`, `function __clk_hfpll_enable`, `function clk_hfpll_enable`, `function __clk_hfpll_disable`, `function clk_hfpll_disable`, `function clk_hfpll_determine_rate`, `function clk_hfpll_set_rate`, `function clk_hfpll_recalc_rate`, `function clk_hfpll_init`, `function hfpll_is_enabled`.
- Atlas domain: Driver Families / drivers/clk.
- 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.