atcrtc_check_write_done(9)
π
atcrtc_check_write_done β in the (9) kernel API manual, bestie
okay so real talk, this one's about the ATC RTC driver and specifically waiting for the RTC registers to finish syncing. it's giving "patience is a virtue" but make it kernel code β¨
πΈ NAME πΈ
atcrtc_check_write_done β literally just wait for the RTC registers to be synchronized, no cap π
π SYNOPSIS π
int atcrtc_check_write_done (struct atcrtc_dev *rtc );
π¦ ARGUMENTS π¦
rtcβ a pointer to theatcrtc_devstructure. that's the one, that's the whole argument, she's simple and she knows it π
β¨ DESCRIPTION β¨
okay bestie so picture this: there's a WriteDone bit in the status register, right? and that bit is basically the vibe check for whether RTC register updates have finished synchronizing π
the way it works: that bit gets cleared to zero whenever any RTC control register is written β and yes, that means Counter, Alarm, Control, etc., all of them, the whole squad π
then it comes back to one only after all the previous updates have been fully synchronized to the RTC clock domain. so like, not before, not kinda-sorta, fully. periodt π
this function polls the WriteDone bit with a timeout, so you can be sure the device is actually ready for the next operation instead of just assuming and making a whole mess π
π₯ RETURN π₯
0on success β slay, we're synced π-EBUSYon timeout β she waited and she waited and it did NOT happen, so, yeah π
π SEE ALSO π
- Kernel file
./drivers/rtc/rtc-atcrtc100.cβ go read the source, iykyk π«Ά
ngl if you get -EBUSY back, that's your sign the hardware's still cooking. do not skip the check, bestie, the check is the whole point π§
that's the whole page, mwah π β this little gem lives in ./drivers/rtc, dropped October 2026, straight from the Kernel API Manual. go forth and sync responsibly, queen πβ¨
π¦ 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