rtc_irq_set_freq(9)
β¨ rtc_irq_set_freq(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a lil function called rtc_irq_set_freq β think of it as the DJ deck for your real-time clock's periodic interrupt. it sets the frequency, and we're gonna get into it π
π¦ SYNOPSIS π¦
int rtc_irq_set_freq (struct rtc_device *rtc , int freq );
like yes, that's the whole vibe: you hand it a device, you hand it a number, it returns an int. slay β¨
πΈ ARGUMENTS πΈ
rtcβ the rtc device π your main character, the actual real-time clock you're messing with.freqβ a positive frequency β ngl the "positive" part is doing a lot of work here, keep it in mind.
π«Ά CONTEXT π«Ά
any π₯ literally any context, no restrictions, go off queen.
π DESCRIPTION π
so here's the thing bestie, and it's lowkey important: this function sets the 2^N Hz periodic IRQ frequency for the IRQ π that's the whole job. it's giving very niche, very specific, very iconic.
but the footnote!!! π rtc_irq_set_state is the one you use to enable or disable the periodic IRQs. so like β setting the frequency and turning the thing on/off are two different functions, don't get it twisted π this one sets the freq, that one flips the switch.
π¨ vibe check: this page doesn't tell you what happens with a bad freq, so don't come for me β all it says is positive frequency and 2^N Hz. periodt.
π SEE ALSO π
Kernel file ./drivers/rtc/interface.c β and the whole friend group π:
rtc_read_next_alarm(9)rtc_handle_legacy_irq(9)rtc_aie_update_irq(9)rtc_uie_update_irq(9)rtc_pie_update_irq(9)rtc_update_irq(9)rtc_irq_set_state(9)rtc_timer_enqueue(9)rtc_timer_remove(9)rtc_timer_do_work(9)rtc_read_offset(9)rtc_set_offset(9)
π§ sign-off π§
this lil masterpiece lives in ./drivers/rtc, dated October 2026 π that's the source/version and the date, all cute and accounted for. bye bestie, go set some frequencies π
β¨πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms