drivers/clk/sunxi/clk-factors.h
Source file repositories/reference/linux-study-clean/drivers/clk/sunxi/clk-factors.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/sunxi/clk-factors.h- Extension
.h- Size
- 1384 bytes
- Lines
- 66
- 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.hlinux/spinlock.h
Detected Declarations
struct clk_factors_configstruct factors_requeststruct factors_datastruct clk_factors
Annotated Snippet
struct clk_factors_config {
u8 nshift;
u8 nwidth;
u8 kshift;
u8 kwidth;
u8 mshift;
u8 mwidth;
u8 pshift;
u8 pwidth;
u8 n_start;
};
struct factors_request {
unsigned long rate;
unsigned long parent_rate;
u8 parent_index;
u8 n;
u8 k;
u8 m;
u8 p;
};
struct factors_data {
int enable;
int mux;
int muxmask;
const struct clk_factors_config *table;
void (*getter)(struct factors_request *req);
void (*recalc)(struct factors_request *req);
const char *name;
};
struct clk_factors {
struct clk_hw hw;
void __iomem *reg;
const struct clk_factors_config *config;
void (*get_factors)(struct factors_request *req);
void (*recalc)(struct factors_request *req);
spinlock_t *lock;
/* for cleanup */
struct clk_mux *mux;
struct clk_gate *gate;
};
struct clk *sunxi_factors_register(struct device_node *node,
const struct factors_data *data,
spinlock_t *lock,
void __iomem *reg);
struct clk *sunxi_factors_register_critical(struct device_node *node,
const struct factors_data *data,
spinlock_t *lock,
void __iomem *reg);
void sunxi_factors_unregister(struct device_node *node, struct clk *clk);
#endif
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/spinlock.h`.
- Detected declarations: `struct clk_factors_config`, `struct factors_request`, `struct factors_data`, `struct clk_factors`.
- 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.