pm_clk_add_notifier(9)
π 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:nbuninitialized? fine.notifier_callreplaced withpm_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:
pm_clk_list_lock(9)pm_clk_list_unlock(9)pm_clk_op_lock(9)pm_clk_op_unlock(9)__pm_clk_enable(9)pm_clk_acquire(9)pm_clk_add(9)pm_clk_add_clk(9)of_pm_clk_add_clks(9)__pm_clk_remove(9)pm_clk_remove_clk(9)pm_clk_init(9)pm_clk_create(9)pm_clk_destroy(9)pm_clk_suspend(9)pm_clk_resume(9)pm_clk_notify(9)enable_clock(9)disable_clock(9)pm_clk_notify(9)
(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
- 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