drivers/clk/sprd/pll.c
Source file repositories/reference/linux-study-clean/drivers/clk/sprd/pll.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/sprd/pll.c- Extension
.c- Size
- 6490 bytes
- Lines
- 270
- 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.
- 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/delay.hlinux/err.hlinux/regmap.hlinux/slab.hpll.h
Detected Declarations
function sprd_pll_readfunction sprd_pll_writefunction pll_get_refinfunction pll_get_ibiasfunction _sprd_pll_recalc_ratefunction _sprd_pll_set_ratefunction sprd_pll_recalc_ratefunction sprd_pll_set_ratefunction sprd_pll_clk_preparefunction sprd_pll_determine_rateexport sprd_pll_ops
Annotated Snippet
if (cfg[i].msk) {
sprd_pll_write(pll, i, cfg[i].msk, cfg[i].val);
ret |= SPRD_PLL_WRITE_CHECK(pll, i, cfg[i].msk,
cfg[i].val);
}
}
if (!ret)
udelay(pll->udelay);
kfree(cfg);
return ret;
}
static unsigned long sprd_pll_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{
struct sprd_pll *pll = hw_to_sprd_pll(hw);
return _sprd_pll_recalc_rate(pll, parent_rate);
}
static int sprd_pll_set_rate(struct clk_hw *hw,
unsigned long rate,
unsigned long parent_rate)
{
struct sprd_pll *pll = hw_to_sprd_pll(hw);
return _sprd_pll_set_rate(pll, rate, parent_rate);
}
static int sprd_pll_clk_prepare(struct clk_hw *hw)
{
struct sprd_pll *pll = hw_to_sprd_pll(hw);
udelay(pll->udelay);
return 0;
}
static int sprd_pll_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
return 0;
}
const struct clk_ops sprd_pll_ops = {
.prepare = sprd_pll_clk_prepare,
.recalc_rate = sprd_pll_recalc_rate,
.determine_rate = sprd_pll_determine_rate,
.set_rate = sprd_pll_set_rate,
};
EXPORT_SYMBOL_GPL(sprd_pll_ops);
Annotation
- Immediate include surface: `linux/delay.h`, `linux/err.h`, `linux/regmap.h`, `linux/slab.h`, `pll.h`.
- Detected declarations: `function sprd_pll_read`, `function sprd_pll_write`, `function pll_get_refin`, `function pll_get_ibias`, `function _sprd_pll_recalc_rate`, `function _sprd_pll_set_rate`, `function sprd_pll_recalc_rate`, `function sprd_pll_set_rate`, `function sprd_pll_clk_prepare`, `function sprd_pll_determine_rate`.
- Atlas domain: Driver Families / drivers/clk.
- Implementation status: integration 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.