clk_disable(9)
π NAME
clk_disable β the "okay bestie we're done here" call that tells the system your clock source is no longer required β¨
(also hi, this is a page from the Kernel API Manual, and it's lowkey one of the most important little functions you'll ever call π«Ά)
πΈ SYNOPSIS
void clk_disable (struct clk *clk );
π ARGUMENTS
clkβ the clock source, bestie. that's your whole argument. one (1) clock. iconic minimalism fr π
π¦ DESCRIPTION
Okay so basically: you're informing the system that a clock source is no longer required by a driver, and that it may be shut down. that's it, that's the vibe. you're releasing your claim on it π
The slay part? It may be called from atomic contexts. yes literally. atomic. no sleeping, no blocking, she just works π
Implementation detail (iykyk): if the clock source is shared between multiple drivers, thenclk_enablecalls must be balanced by the same number ofclk_disablecalls for the clock source to actually be disabled. like. it's a ratio thing. you enable once, you disable once. enable twice? you owe two disables. don't leave the clock hanging, it's giving unbalanced energy and that's not the main character move π
β SEE ALSO
Kernel file ./include/linux/clk.h π« and honestly the whole extended clk cinematic universe:
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_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)
and that's the whole page, bestie π§ no cap, you're now officially clock-literate π
Source: ./include/linux β dated October 2026 π (yes the date is in the future, the kernel docs said so, not me π). go forth and balance your enables and disables, 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