drivers/clk/pistachio/clk.h
Source file repositories/reference/linux-study-clean/drivers/clk/pistachio/clk.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/pistachio/clk.h- Extension
.h- Size
- 3872 bytes
- Lines
- 172
- 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-provider.h
Detected Declarations
struct pistachio_gatestruct pistachio_muxstruct pistachio_divstruct pistachio_fixed_factorstruct pistachio_pll_rate_tablestruct pistachio_pllstruct pistachio_clk_providerenum pistachio_pll_type
Annotated Snippet
struct pistachio_gate {
unsigned int id;
unsigned long reg;
unsigned int shift;
const char *name;
const char *parent;
};
#define GATE(_id, _name, _pname, _reg, _shift) \
{ \
.id = _id, \
.reg = _reg, \
.shift = _shift, \
.name = _name, \
.parent = _pname, \
}
struct pistachio_mux {
unsigned int id;
unsigned long reg;
unsigned int shift;
unsigned int num_parents;
const char *name;
const char *const *parents;
};
#define PNAME(x) static const char *const x[] __initconst
#define MUX(_id, _name, _pnames, _reg, _shift) \
{ \
.id = _id, \
.reg = _reg, \
.shift = _shift, \
.name = _name, \
.parents = _pnames, \
.num_parents = ARRAY_SIZE(_pnames) \
}
struct pistachio_div {
unsigned int id;
unsigned long reg;
unsigned int width;
unsigned int div_flags;
const char *name;
const char *parent;
};
#define DIV(_id, _name, _pname, _reg, _width) \
{ \
.id = _id, \
.reg = _reg, \
.width = _width, \
.div_flags = 0, \
.name = _name, \
.parent = _pname, \
}
#define DIV_F(_id, _name, _pname, _reg, _width, _div_flags) \
{ \
.id = _id, \
.reg = _reg, \
.width = _width, \
.div_flags = _div_flags, \
.name = _name, \
.parent = _pname, \
}
struct pistachio_fixed_factor {
unsigned int id;
unsigned int div;
const char *name;
const char *parent;
};
#define FIXED_FACTOR(_id, _name, _pname, _div) \
{ \
.id = _id, \
.div = _div, \
.name = _name, \
.parent = _pname, \
}
struct pistachio_pll_rate_table {
unsigned long long fref;
unsigned long long fout;
unsigned long long refdiv;
unsigned long long fbdiv;
unsigned long long postdiv1;
unsigned long long postdiv2;
Annotation
- Immediate include surface: `linux/clk-provider.h`.
- Detected declarations: `struct pistachio_gate`, `struct pistachio_mux`, `struct pistachio_div`, `struct pistachio_fixed_factor`, `struct pistachio_pll_rate_table`, `struct pistachio_pll`, `struct pistachio_clk_provider`, `enum pistachio_pll_type`.
- 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.