clk_bulk_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, you're looking at the Kernel API Manual page for clk_bulk_get πŸ’… β€” it's literally the "grab a whole squad of clock consumers in one shot" helper. Let's get into it 🫢

✨ NAME ✨

clk_bulk_get β€” lookup and obtain a number of references to clock producer. πŸ‘‘

🌸 SYNOPSIS 🌸

int clk_bulk_get (struct device *dev , int num_clks , struct clk_bulk_data *clks );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” device for clock "consumer" 😌
  • num_clks β€” the number of clk_bulk_data
  • clks β€” the clk_bulk_data table of consumer

πŸ’… DESCRIPTION πŸ’…

This helper function lets drivers get several clk consumers in one operation. Iconic. ✨

If any of the clk cannot be acquired, then any clks that were obtained will be freed before returning to the caller. No leaked refs, periodt. πŸ’–

It returns 0 if all clocks specified in clk_bulk_data table are obtained successfully, or valid IS_ERR condition containing errno. The implementation uses dev and clk_bulk_data.id to determine the clock consumer, and thereby the clock producer. The clock returned is stored in each clk_bulk_data.clk field. Ngl that's the whole mapping vibe. πŸ¦‹

Drivers must assume that the clock source is not enabled. 🚨

clk_bulk_get should not be called from within interrupt context. Like, do not do it, bestie 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./include/linux/clk.h


That's the whole page, bestie πŸ’–. Source/version vibes: ./include/linux, Kernel API Manual, page clk_bulk_get(9), dated October 2026. Byeee 🫢✨

πŸ“¦ where this page comes from