devm_get_clk_from_child(9)
π
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 π
- Kernel file
./include/linux/clk.h clk notifier callback types(9)struct clk_notifier(9)struct clk_notifier_data(9)struct clk_bulk_data(9)clk_notifier_register(9)clk_notifier_unregister(9)devm_clk_notifier_register(9)clk_get_accuracy(9)clk_set_phase(9)clk_get_phase(9)clk_set_duty_cycle(9)clk_get_scaled_duty_cycle(9)clk_is_match(9)clk_rate_exclusive_get(9)devm_clk_rate_exclusive_get(9)clk_rate_exclusive_put(9)clk_save_context(9)clk_restore_context(9)clk_prepare(9)clk_unprepare(9)clk_is_enabled_when_prepared(9)clk_get(9)clk_bulk_get(9)clk_bulk_get_all(9)clk_bulk_get_optional(9)devm_clk_bulk_get(9)devm_clk_bulk_get_optional(9)devm_clk_bulk_get_enable(9)devm_clk_bulk_get_optional_enable(9)devm_clk_bulk_get_all(9)devm_clk_bulk_get_all_enabled(9)devm_clk_get(9)devm_clk_get_prepared(9)devm_clk_get_enabled(9)devm_clk_get_optional(9)devm_clk_get_optional_prepared(9)devm_clk_get_optional_enabled(9)devm_clk_get_optional_enabled_with_rate(9)clk_enable(9)clk_bulk_enable(9)clk_disable(9)clk_bulk_disable(9)clk_get_rate(9)clk_put(9)clk_bulk_put(9)clk_bulk_put_all(9)devm_clk_put(9)clk_round_rate(9)clk_set_rate(9)clk_set_rate_exclusive(9)clk_has_parent(9)clk_set_rate_range(9)clk_set_min_rate(9)clk_set_max_rate(9)clk_set_parent(9)clk_get_parent(9)clk_get_sys(9)clk_drop_range(9)clk_get_optional(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms