devm_clk_bulk_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 devm_clk_bulk_get (9) β€” Kernel API Manual ✨

okay bestie, welcome to the glow-up era of <pink>devm_clk_bulk_get</pink> πŸ’… this one lives in the Kernel API Manual and it's literally the managed version of grabbing a whole squad of clock consumers at once. main character energy fr fr πŸŽ€


πŸ’– NAME πŸ’–

devm_clk_bulk_get β€” managed get multiple clk consumers πŸ•πŸ•πŸ•


✨ SYNOPSIS ✨

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

🫢 ARGUMENTS 🫢

  • dev β€” the device that's acting as the clock "consumer". yeah, like the customer. the one who wants the clocks. πŸ‘‘
  • num_clks β€” the number of clk_bulk_data. literally how many you're asking for, bestie. count them. πŸ”’
  • clks β€” the clk_bulk_data table of the consumer. this is where the goods land πŸ“‹

πŸ’€ DESCRIPTION πŸ’€

So here's the vibe: it returns 0 on success, and an errno on failure. that's it. no cap 🧚

This helper function lets drivers get several clk consumers in one single operation β€” with management ✨ β€” and the clks will automatically be freed when the device is unbound. the way that it just cleans up after itself?? iconic. no manual clk_bulk_put era for you, you're free πŸ™ˆ

⚠️ real talk though: it's return value first, everything else second β€” always check that 0 vs errno, bestie, because failure is a whole mood you do NOT want to discover later 😭

🌈 SEE ALSO 🌈

Kernel file ./include/linux/clk.h β€” plus the whole friend group, and yes, they're all invited:


and that's the page!! πŸ’œ go off, grab your clocks, let the devres machinery handle the cleanup β€” it's giving responsible adult πŸ¦‹

🌸 cute sign-off: this beauty lives in ./include/linux and it's dated October 2026 β€” bookmark it, screenshot it, put it on your fridge πŸ“ mwah πŸ’‹
πŸ“¦ where this page comes from