devm_clk_put(9)
π
devm_clk_put(9)
okay bestie, so this page lives in the Kernel API Manual and it's all about letting go of a clock the ~managed~ way. releasing your grip, but make it devres. π«Ά
β¨ NAME β¨
devm_clk_put β "free" a managed clock source. that's it, that's the whole vibe. it's your official clock-drop. π
π SYNOPSIS π
void devm_clk_put (struct device *dev , struct clk *clk );
literally the entire function signature, no surprises, no plot twist. π
π¦ ARGUMENTS π¦
devβ the device you used to acquire the clock. it's the whole reason this is a managed clock, so don't forget who got you here. π§clkβ the clock source itself, and not just any clock: the one you got withdevm_clk_get. π
π NOTE π
drivers must ensure that allclk_enablecalls made on this clock source are balanced byclk_disablecalls prior to calling this function. unbalanced enables? that's a no from the kernel, fr fr. π₯
clk_put should not be called from within interrupt context. nope, not in an IRQ, not in your interrupt-era. π
π SEE ALSO π
the whole clock friend group showed up, no cap:
- 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)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)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)
like I said. everyone. π
πΈ k thx bye πΈ
this little page came to you straight from ./include/linux and it's dated October 2026 β so yeah, future-coded and iconic. go balance those enables and stay out of interrupt context, bestie. slay π
β¨π
π¦ 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