STRUCT CLK_NOTIFIER_DATA(9)
๐ STRUCT CLK_NOTIFIER_DATA(9) ๐
okay so real talk, this is from the Kernel API Manual and it's literally the little data bundle that gets handed to your clock notifier callback ๐ like, it's the envelope your rate-change news arrives in, and honestly? iconic.
โจ NAME โจ
struct clk_notifier_data โ the rate data you pass along to the notifier callback. that's it, that's the whole vibe ๐ซถ
๐ธ SYNOPSIS ๐ธ
struct clk_notifier_data {
struct clk *clk;
unsigned long old_rate;
unsigned long new_rate;
};
look at her. three fields. flawless. no notes ๐
๐ฆ Members ๐ฆ
clkโ astruct clk *, aka the clock that's being changed. the main character of this whole situation ๐old_rateโ the previous rate of this clk. the "before" pic ๐ธnew_rateโ the new rate of this clk. the glow-up โจ
๐ Description ๐
okay so here's the tea, and it depends on which kind of notifier you're running โ
For a pre-notifier: old_rate is the clk's rate before this rate change, and new_rate is what the rate will be in the future. so you're getting the prophecy before it happens ๐ฎ
For a post-notifier: old_rate and new_rate are both set to the clk's current rate. and before you come for her โ this was done to optimize the implementation. she's efficient, not lazy, periodt ๐
๐ SEE ALSO ๐
Kernel file ./include/linux/clk.h โ and like, the entire extended clk cinematic universe, fr fr:
clk notifier callback types(9)struct clk_notifier(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(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, go touch some struct clk ๐ง๐
sign-off szn: this lil masterpiece lives in ./include/linux, dated October 2026, and answers to the name struct clk_notifier_data(9) โ slay, mwah ๐๐ธ
๐ฆ 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