clk_bulk_get_all(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clk_bulk_get_all(9) β€” the Kernel API Manual page, bestie edition ✨

okay so this is a page from the Kernel API Manual, and it's about clk_bulk_get_all β€” yes the whole gang of clocks at once, we love a bulk moment 🫢


🌸 NAME 🌸

clk_bulk_get_all β€” lookup and obtain all available references to clock producer. all of them. every single one. no cap πŸ’…


✨ SYNOPSIS ✨

int clk_bulk_get_all (struct device *dev , struct clk_bulk_data **clks );

like literally that's the whole signature, she's compact and she knows it πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device for clock "consumer" πŸ‘‘ (yep, "consumer" in quotes, that's how the page says it, we're not changing it)
  • clks β€” pointer to the clk_bulk_data table of consumer. this is where all the acquired clock references get parked πŸš—βœ¨

πŸ’– DESCRIPTION πŸ’–

so this helper function lets drivers get all clk consumers in one operation β€” one call, whole squad acquired, iconic behaviour honestly ⭐

but listen: if any of the clk cannot be acquired, then any clks that were obtained will be freed before returning to the caller. no half-finished vibes, she cleans up after herself πŸ§ΉπŸ’…

here's the return-value tea β˜•:

  • Returns a positive value for the number of clocks obtained, while the clock references are stored in the clk_bulk_data table in clks field. πŸŽ€
  • Returns 0 if there're none.
  • Returns a negative value if something failed. 😭
🚨 drivers must assume that the clock source is not enabled. do not assume it's on, bestie. it is not. periodt.
πŸ’€ and fr fr: clk_bulk_get should not be called from within interrupt context. just don't. not the vibe, not the move, not today πŸ™ˆ

🌈 SEE ALSO 🌈

the whole extended family, gathered for the group chat 🫢:


and that's the page, bestie πŸ’œ it's from ./include/linux, dated October 2026, and it goes by clk_bulk_get_all(9) β€” go get those clocks, but like, all of them πŸ•βœ¨πŸŽ€

πŸ“¦ where this page comes from