__clk_recalc_accuracies(9)
π
__clk_recalc_accuracies(9) β¨
okay bestie so you found yourself in the Kernel API Manual β welcome, pull up a chair, this one's a function not a whole program, and it's genuinely kind of elegant. let's get into it π
πΈ NAME πΈ
__clk_recalc_accuracies β recalculate all accuracies in the clk subtree, no cap, the whole tree, every single clock in it π
β¨ SYNOPSIS β¨
void __clk_recalc_accuracies (struct clk_core *core );
that's it. that's the whole call. one pointer, no return value, void like it has nothing to prove π
π«Ά ARGUMENTS π«Ά
coreβ the first clk in the subtree. like, the top of the tree, the main character of this little clk family reunion π
π¦ DESCRIPTION π¦
so what it actually does: it walks the subtree of clks starting with core, and recalculates accuracies as it goes. like a little accuracy glow-up road trip through the whole family tree π
and here's the part you gotta know, bestie, this is the important bit: if a clk does not implement the .recalc_accuracy callback, then it is assumed that the clock will take on the accuracy of its parent. so no callback, no problem β it just inherits the vibe from up the tree. it's giving nepo baby but in a clock framework way π
no extra behaviour, no guessing β that's literally exactly what it does fr fr. walk the subtree, recalc accuracies, and anyone without .recalc_accuracy copies their parent's accuracy. periodt.
π SEE ALSO π
okay this list is long and I'm obsessed, everyone's here, it's the whole group chat π
- The source file: Kernel file
./drivers/clk/clk.c, plusstruct clk_core(9)β the struct itself, the blueprint icon β¨ - PM runtime + rate stuff:
clk_pm_runtime_get_all(9),clk_pm_runtime_put_all(9),clk_core_get(9),clk_determine_rate_noop(9),clk_rate_exclusive_put(9),clk_rate_exclusive_get(9) - Prepare / enable / context crew:
clk_unprepare(9),clk_prepare(9),clk_disable(9),clk_gate_restore_context(9),clk_save_context(9),clk_restore_context(9),clk_enable(9),clk_is_enabled_when_prepared(9) - Rate request besties:
clk_hw_init_rate_request(9),clk_hw_forward_rate_request(9),__clk_determine_rate(9),clk_hw_round_rate(9),clk_round_rate(9),__clk_notify(9),clk_get_accuracy(9),__clk_recalc_rates(9),clk_get_rate(9),clk_hw_get_parent_index(9),__clk_speculate_rates(9) - Setting rates, the whole saga:
clk_set_rate(9),clk_set_rate_exclusive(9),clk_set_rate_range(9),clk_set_min_rate(9),clk_set_max_rate(9) - Parents, phases, duty cycles:
clk_get_parent(9),clk_has_parent(9),clk_set_parent(9),clk_set_phase(9),clk_get_phase(9),clk_set_duty_cycle(9),clk_get_scaled_duty_cycle(9),clk_is_match(9) - Init + core plumbing:
clk_debug_register(9),clk_debug_init(9),__clk_core_init(9),clk_core_link_consumer(9),clk_core_unlink_consumer(9),alloc_clk(9),free_clk(9),clk_hw_create_clk(9),clk_hw_get_clk(9),dev_or_parent_of_node(9) - Register / unregister era:
clk_register(9),clk_hw_register(9),clk_unregister(9),clk_hw_unregister(9),devm_clk_register(9),devm_clk_hw_register(9),devm_clk_hw_get_clk(9) - Notifiers:
clk_notifier_register(9),clk_notifier_unregister(9) - Device-tree / OF girlies:
struct of_clk_provider(9),of_clk_add_provider(9),of_clk_add_hw_provider(9),devm_of_clk_add_hw_provider(9),of_clk_del_provider(9),of_parse_clkspec(9),of_clk_get_from_provider(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)
and that's the whole page, bestie, you ate it π this one lives in ./drivers/clk and the manual's dated October 2026 β so yeah, future girlie behaviour, iconic, no notes ππ
π¦
π¦ 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