drivers/clk/mediatek/clk-gate.h
Source file repositories/reference/linux-study-clean/drivers/clk/mediatek/clk-gate.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/mediatek/clk-gate.h- Extension
.h- Size
- 1621 bytes
- Lines
- 64
- 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/types.h
Detected Declarations
struct clkstruct clk_hw_onecell_datastruct clk_opsstruct devicestruct device_nodestruct mtk_gate_regsstruct mtk_gate
Annotated Snippet
struct mtk_gate_regs {
u32 sta_ofs;
u32 clr_ofs;
u32 set_ofs;
};
struct mtk_gate {
int id;
const char *name;
const char *parent_name;
const struct mtk_gate_regs *regs;
const struct mtk_gate_regs *hwv_regs;
int shift;
const struct clk_ops *ops;
unsigned long flags;
};
#define GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, \
_ops, _flags) { \
.id = _id, \
.name = _name, \
.parent_name = _parent, \
.regs = _regs, \
.shift = _shift, \
.ops = _ops, \
.flags = _flags, \
}
#define GATE_MTK(_id, _name, _parent, _regs, _shift, _ops) \
GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, _ops, 0)
int mtk_clk_register_gates(struct device *dev, struct device_node *node,
const struct mtk_gate *clks, int num,
struct clk_hw_onecell_data *clk_data);
void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
struct clk_hw_onecell_data *clk_data);
#endif /* __DRV_CLK_GATE_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct clk`, `struct clk_hw_onecell_data`, `struct clk_ops`, `struct device`, `struct device_node`, `struct mtk_gate_regs`, `struct mtk_gate`.
- 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.