clk_set_rate(9)
π clk_set_rate β set the clock rate for a clock source π
okay so this is a page from the Kernel API Manual (section 9, the kernel-API girlies) and it's literally all about telling a clock "hey bestie, go this fast now" β¨
πΈ SYNOPSIS πΈ
int clk_set_rate (struct clk *clk , unsigned long rate );
π ARGUMENTS π
clkβ the clock source π like, the actual clock you're setting the rate onrateβ the desired clock rate in Hz, no cap, this is the number you want it to hit
π¦ DESCRIPTION π¦
so the way this works is kind of iconic actually: updating the rate starts at the top-most affected clock, and then it walks the tree down to the bottom-most clock that needs updating. like a whole little glow-up relay race down the clock tree πβ¨
It returns success (0) or a negative errno. that's it, that's the vibe β 0 means slay, negative means something went sideways π
π SEE ALSO π
Kernel file ./include/linux/clk.h β and honestly the whole clock friend group showed up for this one, so let's give them their moment π«Ά
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),devm_get_clk_from_child(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_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)
and that's the page, bestie π it lives under ./include/linux in the tree, it's the October 2026 edition of the Kernel API Manual, and it's giving "tiny page, huge friend group" energy fr fr π
π¦ 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