rockchip_sa...top_and_wait(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ rockchip_sa...top_and_wait(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” yes it's a whole manual page for one tiny function and honestly? she deserves it. this is rockchip_sai_xfer_clk_stop_and_wait and she's here to stop a clock and then wait about it. very main character, no notes πŸ’…


✨ NAME ✨

rockchip_sai_xfer_clk_stop_and_wait β€” stop the xfer clock and wait for it to be idle πŸ›‘β³

like, that's literally her whole job. stop the clock, then vibe-check it until it's idle. periodt.


🌸 SYNOPSIS 🌸

void rockchip_sai_xfer_clk_stop_and_wait (struct rk_sai_dev *sai ,
unsigned int *to_restore );

note the return type: void. she gives nothing back. she simply does the task and leaves ✨


πŸ’– ARGUMENTS πŸ’–

  • sai β€” pointer to the driver instance's rk_sai_dev struct 🫢 this is the little guy she's working on, iykyk
  • to_restore β€” pointer to store the CLK/FSS register values in as they were found before they were cleared, or NULL. so like, if you pass a real pointer she'll save the receipts πŸ“, and if you pass NULL she just... won't. your call bb πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜•:

she clears the XFER_CLK and XFER_FSS registers if needed, and then she busy-waits for the XFER clocks to be idle. busy-waiting! she's not sleeping, she's not napping, she is spinning and watching πŸ‘€πŸ”₯

and before she clears those bits β€” key detail, don't miss it β€” she stores the state of the registers as she encountered them into to_restore, but only if to_restore isn't NULL. so the original vibe is preserved for later, slay πŸ’Ύβœ¨


πŸ’œ CONTEXT πŸ’œ

any context. literally any. she's flexible like that 🧚

⚠️ but bestie β€” she expects sai->xfer_lock to be held by the caller. that's on you, not her. she is not grabbing that lock herself, she's trusting you to have done it already. don't do her dirty like that πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./sound/soc/rockchip/rockchip_sai.c β€” go read the source, it's giving lore πŸ“–πŸ‘‘

and that's the whole page, bestie!! stay hydrated, hold your locks, and remember: busy-waiting is valid but she's not easy πŸ’–

β€” with love, from ./sound/soc/rockchip, dated October 2026 πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from