drivers/clk/mxs/clk.h
Source file repositories/reference/linux-study-clean/drivers/clk/mxs/clk.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/mxs/clk.h- Extension
.h- Size
- 1738 bytes
- Lines
- 62
- 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
Annotated Snippet
#ifndef __MXS_CLK_H
#define __MXS_CLK_H
struct clk;
#include <linux/clk-provider.h>
#include <linux/spinlock.h>
#define SET 0x4
#define CLR 0x8
extern spinlock_t mxs_lock;
int mxs_clk_wait(void __iomem *reg, u8 shift);
struct clk *mxs_clk_pll(const char *name, const char *parent_name,
void __iomem *base, u8 power, unsigned long rate);
struct clk *mxs_clk_ref(const char *name, const char *parent_name,
void __iomem *reg, u8 idx);
struct clk *mxs_clk_div(const char *name, const char *parent_name,
void __iomem *reg, u8 shift, u8 width, u8 busy);
struct clk *mxs_clk_frac(const char *name, const char *parent_name,
void __iomem *reg, u8 shift, u8 width, u8 busy);
static inline struct clk *mxs_clk_fixed(const char *name, int rate)
{
return clk_register_fixed_rate(NULL, name, NULL, 0, rate);
}
static inline struct clk *mxs_clk_gate(const char *name,
const char *parent_name, void __iomem *reg, u8 shift)
{
return clk_register_gate(NULL, name, parent_name, CLK_SET_RATE_PARENT,
reg, shift, CLK_GATE_SET_TO_DISABLE,
&mxs_lock);
}
static inline struct clk *mxs_clk_mux(const char *name, void __iomem *reg,
u8 shift, u8 width, const char *const *parent_names, int num_parents)
{
return clk_register_mux(NULL, name, parent_names, num_parents,
CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,
reg, shift, width, 0, &mxs_lock);
}
static inline struct clk *mxs_clk_fixed_factor(const char *name,
const char *parent_name, unsigned int mult, unsigned int div)
{
return clk_register_fixed_factor(NULL, name, parent_name,
CLK_SET_RATE_PARENT, mult, div);
}
#endif /* __MXS_CLK_H */
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/spinlock.h`.
- Detected declarations: `struct clk`.
- 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.