drivers/clk/spacemit/ccu_common.h
Source file repositories/reference/linux-study-clean/drivers/clk/spacemit/ccu_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/spacemit/ccu_common.h- Extension
.h- Size
- 1140 bytes
- Lines
- 60
- 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/platform_device.hlinux/regmap.h
Detected Declarations
struct ccu_commonstruct spacemit_ccu_data
Annotated Snippet
struct ccu_common {
struct regmap *regmap;
struct regmap *lock_regmap;
union {
/* For DDN and MIX */
struct {
u32 reg_ctrl;
u32 reg_fc;
u32 mask_fc;
};
/* For PLL */
struct {
u32 reg_swcr1;
u32 reg_swcr2;
u32 reg_swcr3;
};
};
struct clk_hw hw;
};
static inline struct ccu_common *hw_to_ccu_common(struct clk_hw *hw)
{
return container_of(hw, struct ccu_common, hw);
}
struct spacemit_ccu_data {
const char *reset_name;
struct clk_hw **hws;
size_t num;
};
#define ccu_read(c, reg) \
({ \
u32 tmp; \
regmap_read((c)->regmap, (c)->reg_##reg, &tmp); \
tmp; \
})
#define ccu_update(c, reg, mask, val) \
regmap_update_bits((c)->regmap, (c)->reg_##reg, mask, val)
int spacemit_ccu_probe(struct platform_device *pdev, const char *compat);
#endif /* _CCU_COMMON_H_ */
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/platform_device.h`, `linux/regmap.h`.
- Detected declarations: `struct ccu_common`, `struct spacemit_ccu_data`.
- 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.