devm_get_clk_from_child(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_get_clk_from_child β€” like, the manual page bestie

ok so welcome to the Kernel API Manual entry for devm_get_clk_from_child, the little function that's about to become your whole personality πŸŽ€


✨ NAME ✨

devm_get_clk_from_child β€” lookup and obtain a managed reference to a clock producer from child node. yes that's the whole vibe: you look it up, you obtain it, and it's managed. iconic behaviour honestly 🫢


🌸 SYNOPSIS 🌸

struct clk * devm_get_clk_from_child (struct device *dev , struct device_node *np , const char *con_id );

that's it. that's the whole call. three args, one struct clk * back. slay πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device that's acting as the clock "consumer". it's the one doing the consuming. main character energy, obviously.
  • np β€” pointer to the clock consumer node. like, the node node. the child node in question πŸ‘‘
  • con_id β€” the clock consumer ID. the name-tag basically ✨

πŸ”₯ DESCRIPTION πŸ”₯

ok so real talk: this function parses the clocks, and then it uses them to look up the struct clk from the registered list of clock providers β€” and it does that by using np and con_id. that's the whole lookup mechanism, no cap 🧚

and here's the part everyone's obsessed with: the clock will automatically be freed when the device is unbound from the bus. automatic cleanup?? we love a self-cleaning situation. that's the "managed" part of "managed reference" and it literally does the freeing for you so you don't have to πŸ˜­πŸ’–

ngl this is the actual selling point β€” no manual teardown, the devres machinery handles it when the device gets unbound from the bus. periodt.

⭐ SEE ALSO ⭐

it's giving "reference section went to the gym". every single one of these, in order, no skips πŸ’€


ok that's the page!! this one lives out of ./include/linux and it's dated October 2026 β€” so like, mark your calendars bestie πŸ—“οΈπŸ’œ go free your clocks automatically, ily, bye 🫢✨

πŸ“¦ where this page comes from