zl3073x_chan_tod_adjust(9)
π zl3073x_chan_tod_adjust π
okay bestie, so this is a page from the Kernel API Manual and it's literally all about zl3073x_chan_tod_adjust β atomic ToD read-modify-write with a rollover guard. yes that's a lot of words, we'll get there π«Ά
β¨ NAME β¨
zl3073x_chan_tod_adjust β atomic ToD read-modify-write, but make it safe, with a rollover guard so nothing gets clobbered mid-tick π
πΈ SYNOPSIS πΈ
int zl3073x_chan_tod_adjust (struct zl3073x_dev *zldev , u8 ch , struct timespec64 delta );
like, that's the whole signature. slay. look at it. π
π¦ ARGUMENTS π¦
zldevβ pointer to the zl3073x device, aka the whole vibe you're working onchβ the DPLL channel index, so it knows which channel we're doing this todeltaβ the time adjustment you wanna apply, as astruct timespec64
π DESCRIPTION π
okay so here's the whole thing, and honestly it's giving careful-girl energy:
It reads the next-Hz ToD and the current ToD, then checks whether there's enough time left before the next 1 Hz rollover to safely finish the write. That's the guard! π‘οΈ
And it'll re-read β yes, again β if:
- the 1 Hz tick crossed somewhere in between the two reads π (rude), or
- there's less than 20 ms left before the next rollover
Once everything checks out, it applies delta and writes the result back. periodt. π
π§ CONTEXT π§
real talk: the caller must serialize all zl3073x_chan_tod_* calls externally. that's on you, bestie, not on this function. no cap.
β RETURN β
0on success π<0on error π
π SEE ALSO π
the kernel file lives at ./drivers/dpll/zl3073x/chan.c, and here's the whole friend group:
zl3073x_chan_state_update(9)zl3073x_chan_nco_mode_set(9)zl3073x_chan_state_fetch(9)zl3073x_chan_state_get(9)zl3073x_chan_tod_ready_wait(9)zl3073x_chan_tod_ctrl(9)zl3073x_chan_tod_read(9)zl3073x_chan_tod_write(9)zl3073x_chan_df_offset_set(9)zl3073x_chan_tie_write(9)zl3073x_chan_phase_step(9)zl3073x_chan_state_set(9)
and that's the page!! π it comes from ./drivers/dpll/zl3073x, dated October 2026 (yes, the future, main character energy fr fr β³β¨) β mwah, go read your ToD safely π
π¦ 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