dw_apb_clockevent_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the dw_apb_clockevent_init(9) page from the Kernel API Manual πŸ’– this one is all about turning an APB timer into a clock_event_device, and it's lowkey iconic. no cap, we're keeping every detail. 🫢

✨ NAME ✨

dw_apb_clockevent_init - use an APB timer as a clock_event_device.

🌸 SYNOPSIS 🌸

struct dw_apb_clock_event_device * dw_apb_clockevent_init (int cpu ,
const char *name , unsigned rating , void __iomem *base , int irq ,
unsigned long freq );

πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” the CPU that the events will be targeted at, or -1 if CPU affiliation isn't required. πŸ’…
  • name β€” the name used for the timer and the IRQ for it. cute, labeled, organized. πŸŽ€
  • rating β€” the rating to give the timer. ⭐
  • base β€” the I/O base for the timer registers. that's where the magic lives. ✨
  • irq β€” the interrupt number to use for the timer. πŸ””
  • freq β€” the frequency that the timer counts at. numbers, but make it fashion. πŸ’…

πŸ’… DESCRIPTION πŸ’…

So this function creates a clock_event_device for using with the generic clock layer, but β€” and this is the important part β€” it does not start and register it. nope, not yet. That next step should be done with dw_apb_clockevent_register; think of init as the "get ready" and register as the "go live" moment. πŸ‘‘

If this is the first time it has been called for a timer, then the IRQ will be requested. If it's not the first time, it just gets enabled β€” that's to allow CPU hotplug and avoid repeatedly requesting and releasing the IRQ. fr fr, efficiency. 🌈

tiny but crucial vibe check: dw_apb_clockevent_init is setup only, bestie. don't skip dw_apb_clockevent_register and assume it's already started/registered. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


that's the whole page, bestie 🫢 source/version: ./drivers/clocksource β€’ date: October 2026 β€’ manual: dw_apb_clockevent_init(9) ✨ catch you in the kernel, mwah πŸ’œ

πŸ“¦ where this page comes from