pm_clk_add_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pm_clk_add_notifier(9) πŸ’…

okay so this is a page from the Kernel API Manual and honestly? it's a little guy with one very specific job. bestie, let's get into it ✨


🌸 NAME 🌸

pm_clk_add_notifier β€” Add bus type notifier for power management clocks.

like literally that's the whole vibe: you're hanging a notifier off a bus type so the power-management clock machinery can hear about stuff. iconic behavior honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void pm_clk_add_notifier (const struct bus_type *bus , struct
       pm_clk_notifier_block *clknb );

returns void, so no return value to stress about, we love a function that just does the thing and leaves πŸ’…


🌈 ARGUMENTS 🌈

  • bus β€” the bus type you're adding the notifier to. that's it, that's the whole assignment 🫢
  • clknb β€” the notifier that's getting added to that bus type you just named. they go together, like us πŸ₯°

πŸ’– DESCRIPTION πŸ’–

okay so listen closely because this is the part that actually matters πŸ‘‘

the nb member of clknb is not expected to be initialized β€” do not touch it, do not pre-fill it, it is not your business, the function handles it. and its notifier_call member? yeah that's gonna get replaced with pm_clk_notify. so don't bother setting that either, bestie, it's getting overwritten regardless 😭

however β€” and this is the part people mess up β€” the remaining members of clknb should be populated prior to calling this routine. so like, do your homework on everything else before you call it. the function will not do that part for you. no cap 🧚

fr fr: nb uninitialized? fine. notifier_call replaced with pm_clk_notify? also fine. everything else? your problem. fill it in. periodt.

⭐ SEE ALSO ⭐

Kernel file ./drivers/base/power/clock_ops.c, plus the whole friend group:

(yes pm_clk_notify(9) is listed twice β€” not me making that up, that's literally what the page says, it's giving main character energy so nice it said it twice πŸ’€βœ¨)


mwah πŸ’‹ this one's from ./drivers/base/power, dated October 2026, and it lives at pm_clk_add_notifier(9) β€” go be great, and remember to populate those remaining members πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from