devm_clk_hw_get_clk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– devm_clk_hw_get_clk(9) β€” from the Kernel API Manual, bestie πŸ’–

Okay so picture this: you're deep in the kernel, you need a clock, and you do not want to remember to clean it up later. Enter devm_clk_hw_get_clk. This is the resource-managed glow-up of clk_hw_get_clk(), and honestly? It ate. πŸŽ€


✨ SYNOPSIS ✨

struct clk * devm_clk_hw_get_clk (struct device *dev , struct clk_hw *hw
, const char *con_id );

Yeah it's a whole three-argument situation β€” she's thorough, we respect it. πŸ’…


🫢 ARGUMENTS 🫢

  • dev β€” the device that's registering this clock. Like, the one signing the permission slip πŸ“
  • hw β€” the clk_hw associated with the clk being consumed. This is the hardware-side bestie πŸ¦‹
  • con_id β€” the connection ID string on device. Her little name tag at the party 🏷️

🌸 DESCRIPTION 🌸

So this is the managed version of clk_hw_get_clk. The way that works is: any clocks you get with this function get automatically clk_put on driver detach. No manual cleanup, no leaks, no 3am panic β€” she handles it herself, main character energy fr fr. πŸ‘‘

If you wanna know more about the putting situation, go read clk_put. That's the whole lore. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/clk/clk.c, plus a truly iconic guest list of related functions β€” no cap, it's giving red carpet:


πŸ’œ Quick vibe check: the auto-clk_put-on-detach thing is the WHOLE point of the devm_ prefix here. Don't sleep on it, that's the resource-managed magic and it's literally iconic. ✨

And that's the page, bestie! πŸ“ This one lives in ./drivers/clk, dated October 2026 β€” mwah, sending you good vibes and leak-free drivers, devm_clk_hw_get_clk(9) out. πŸ§šπŸ’–πŸŒΈ

πŸ“¦ where this page comes from