drivers/clk/mediatek/clk-pllfh.h
Source file repositories/reference/linux-study-clean/drivers/clk/mediatek/clk-pllfh.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/mediatek/clk-pllfh.h- Extension
.h- Size
- 1814 bytes
- Lines
- 84
- 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
clk-pll.h
Detected Declarations
struct fh_pll_statestruct fh_pll_datastruct mtk_pllfh_datastruct fh_pll_regsstruct mtk_fhstruct fh_operation
Annotated Snippet
struct fh_pll_state {
void __iomem *base;
u32 fh_enable;
u32 ssc_rate;
};
struct fh_pll_data {
int pll_id;
int fh_id;
int fh_ver;
u32 fhx_offset;
u32 dds_mask;
u32 slope0_value;
u32 slope1_value;
u32 sfstrx_en;
u32 frddsx_en;
u32 fhctlx_en;
u32 tgl_org;
u32 dvfs_tri;
u32 pcwchg;
u32 dt_val;
u32 df_val;
u32 updnlmt_shft;
u32 msk_frddsx_dys;
u32 msk_frddsx_dts;
};
struct mtk_pllfh_data {
struct fh_pll_state state;
const struct fh_pll_data data;
};
struct fh_pll_regs {
void __iomem *reg_hp_en;
void __iomem *reg_clk_con;
void __iomem *reg_rst_con;
void __iomem *reg_slope0;
void __iomem *reg_slope1;
void __iomem *reg_cfg;
void __iomem *reg_updnlmt;
void __iomem *reg_dds;
void __iomem *reg_dvfs;
void __iomem *reg_mon;
};
struct mtk_fh {
struct mtk_clk_pll clk_pll;
struct fh_pll_regs regs;
struct mtk_pllfh_data *pllfh_data;
const struct fh_operation *ops;
spinlock_t *lock;
};
struct fh_operation {
int (*hopping)(struct mtk_fh *fh, unsigned int new_dds,
unsigned int postdiv);
int (*ssc_enable)(struct mtk_fh *fh, u32 rate);
};
int mtk_clk_register_pllfhs(struct device *dev,
const struct mtk_pll_data *plls, int num_plls,
struct mtk_pllfh_data *pllfhs, int num_pllfhs,
struct clk_hw_onecell_data *clk_data);
void mtk_clk_unregister_pllfhs(const struct mtk_pll_data *plls, int num_plls,
struct mtk_pllfh_data *pllfhs, int num_fhs,
struct clk_hw_onecell_data *clk_data);
void fhctl_parse_dt(const u8 *compatible_node, struct mtk_pllfh_data *pllfhs,
int num_pllfhs);
#endif /* __CLK_PLLFH_H */
Annotation
- Immediate include surface: `clk-pll.h`.
- Detected declarations: `struct fh_pll_state`, `struct fh_pll_data`, `struct mtk_pllfh_data`, `struct fh_pll_regs`, `struct mtk_fh`, `struct fh_operation`.
- 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.