STRUCT CLK_NOTIFIER_DATA(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… 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 โ€” a struct 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:


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