drivers/clocksource/timer-of.h
Source file repositories/reference/linux-study-clean/drivers/clocksource/timer-of.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/clocksource/timer-of.h- Extension
.h- Size
- 1342 bytes
- Lines
- 73
- Domain
- Driver Families
- Bucket
- drivers/clocksource
- 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/clockchips.h
Detected Declarations
struct of_timer_irqstruct of_timer_basestruct of_timer_clkstruct timer_offunction timer_of_irqfunction timer_of_ratefunction timer_of_period
Annotated Snippet
struct of_timer_irq {
int irq;
int index;
const char *name;
unsigned long flags;
irq_handler_t handler;
};
struct of_timer_base {
void __iomem *base;
const char *name;
int index;
};
struct of_timer_clk {
struct clk *clk;
const char *name;
int index;
unsigned long rate;
unsigned long period;
};
struct timer_of {
unsigned int flags;
struct device_node *np;
struct clock_event_device clkevt;
struct of_timer_base of_base;
struct of_timer_irq of_irq;
struct of_timer_clk of_clk;
void *private_data;
};
static inline struct timer_of *to_timer_of(struct clock_event_device *clkevt)
{
return container_of(clkevt, struct timer_of, clkevt);
}
static inline void __iomem *timer_of_base(struct timer_of *to)
{
return to->of_base.base;
}
static inline int timer_of_irq(struct timer_of *to)
{
return to->of_irq.irq;
}
static inline unsigned long timer_of_rate(struct timer_of *to)
{
return to->of_clk.rate;
}
static inline unsigned long timer_of_period(struct timer_of *to)
{
return to->of_clk.period;
}
int timer_of_init(struct device_node *np, struct timer_of *to);
void timer_of_cleanup(struct timer_of *to);
#endif
Annotation
- Immediate include surface: `linux/clockchips.h`.
- Detected declarations: `struct of_timer_irq`, `struct of_timer_base`, `struct of_timer_clk`, `struct timer_of`, `function timer_of_irq`, `function timer_of_rate`, `function timer_of_period`.
- Atlas domain: Driver Families / drivers/clocksource.
- 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.