of_clk_get_from_provider(9)
π« of_clk_get_from_provider(9) π«
okay bestie, so this is a page straight out of the Kernel API Manual β it's of_clk_get_from_provider(9), and it's lowkey the little matchmaker that pairs a clock specifier up with an actual clock. let me walk you through it π«Ά
β¨ NAME β¨
of_clk_get_from_provider β look up a clock from a clock provider πΈ
π₯ SYNOPSIS π₯
struct clk * of_clk_get_from_provider (struct of_phandle_args *clkspec
);
like, it hands you back a struct clk * and takes one argument. that's it. that's the whole vibe β¨
π ARGUMENTS π
clkspecβ a pointer to a clock specifier data structure π that's the little data package you're handing over.
π¦ DESCRIPTION π¦
so here's the tea, bestie: this function goes and looks up a struct clk from the registered list of clock providers. it's giving matchmaker energy fr fr π
and the input? a clock specifier data structure β specifically the kind that comes back at you from the of_parse_phandle_with_args function call. that's the one to remember, iykyk β¨
so like: you bring the specifier, it finds the matching clock in the provider list, and everyone slays. no cap π
π SEE ALSO π
sooo much related lore, and honestly the whole gang showed up for this one. the kernel file to peek at is ./drivers/clk/clk.c β that's where the magic lives π§
- structs:
struct clk_core(9),struct of_clk_provider(9) - runtime pm crew:
clk_pm_runtime_get_all(9),clk_pm_runtime_put_all(9) - core getter:
clk_core_get(9) - rate determination:
clk_determine_rate_noop(9),__clk_determine_rate(9),clk_hw_round_rate(9),clk_round_rate(9),clk_hw_init_rate_request(9),clk_hw_forward_rate_request(9) - rate exclusivity:
clk_rate_exclusive_put(9),clk_rate_exclusive_get(9),clk_set_rate_exclusive(9) - prepare/unprepare/enable/disable:
clk_unprepare(9),clk_prepare(9),clk_disable(9),clk_enable(9),clk_is_enabled_when_prepared(9) - context save/restore:
clk_gate_restore_context(9),clk_save_context(9),clk_restore_context(9) - notify + accuracy:
__clk_notify(9),__clk_recalc_accuracies(9),clk_get_accuracy(9),__clk_recalc_rates(9),clk_get_rate(9),__clk_speculate_rates(9) - rates + ranges:
clk_set_rate(9),clk_set_rate_range(9),clk_set_min_rate(9),clk_set_max_rate(9) - parents:
clk_hw_get_parent_index(9),clk_get_parent(9),clk_has_parent(9),clk_set_parent(9) - phase + duty cycle:
clk_set_phase(9),clk_get_phase(9),clk_set_duty_cycle(9),clk_get_scaled_duty_cycle(9) - matching:
clk_is_match(9) - debug:
clk_debug_register(9),clk_debug_init(9) - core init + consumer links:
__clk_core_init(9),clk_core_link_consumer(9),clk_core_unlink_consumer(9) - alloc/free + hw clk creation:
alloc_clk(9),free_clk(9),clk_hw_create_clk(9),clk_hw_get_clk(9),dev_or_parent_of_node(9) - register/unregister:
clk_register(9),clk_hw_register(9),clk_unregister(9),clk_hw_unregister(9) - devm flavors:
devm_clk_register(9),devm_clk_hw_register(9),devm_clk_hw_get_clk(9),devm_of_clk_add_hw_provider(9) - notifiers:
clk_notifier_register(9),clk_notifier_unregister(9) - of_clk provider crew:
of_clk_add_provider(9),of_clk_add_hw_provider(9),of_clk_del_provider(9) - of_clk helpers:
of_parse_clkspec(9),of_clk_get_by_name(9),of_clk_get_parent_count(9),of_clk_parent_fill(9),of_clk_detect_critical(9),of_clk_init(9)
that's the whole group chat, bestie β go say hi π
and that's the page!! π source is ./drivers/clk, dated October 2026, and this little slice of kernel API manual is officially done. go get that clock, queen ππ
β¨
π¦ 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