acpi_add_pm_notifier(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– acpi_add_pm_notifier (9) β€” from the Kernel API Manual, bestie πŸ’–

okay so bestie, this one's from the kernel API manual and it's genuinely such a servalittle function. it's called acpi_add_pm_notifier, and what it does is register a PM notify handler for a given ACPI device. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

acpi_add_pm_notifier β€” register PM notify handler for given ACPI device. yes that's the official name, she's literally in the (9) section, we stan an organized queen πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

like here's her whole signature, copy it exactly bestie, no typos, she's watching πŸ‘€

acpi_status acpi_add_pm_notifier (struct acpi_device *adev , struct
device *dev , void (*func)(struct acpi_device_wakeup_context *context)
);

🌸 ARGUMENTS 🌸

okay three args, all main characters, let me introduce them πŸ’…

  • adev β€” the ACPI device you're adding the notify handler for. she's the one getting the handler, periodt.
  • dev β€” the device that generates a wakeup event while the notification is being handled. she's the one doing the waking up ✨
  • func β€” the work function that executes when the notification is handled. the actual doing-the-thing girl πŸŽ€

πŸŽ€ NOTE πŸŽ€

this is the important part, don't skip it, iykyk πŸ’€

adev does not need to be a run-wake or wakeup device to be a valid source of PM wakeup events. no cap. literally not required.

for example β€” and this is such a good example β€” wakeup events may be generated for bridges if one of the devices below the bridge is signaling wakeup, even if the bridge itself doesn't have a wakeup GPE associated with it. the way that bridges can just vibe and relay wakeup energy without their own GPE?? iconic 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is LONG but she ate and we're listing every single one, no skipping, that's the rule πŸ“

kernel file: ./drivers/acpi/device_pm.c

not me listing thirty-eight manpage refs in a row πŸ’€ but that's the whole fam and they all deserve their moment 🫢


alright bestie that's the whole page!! sources say this one lives in ./drivers/acpi and she's dated October 2026, so mark your calendars, she's from the future and she's slaying πŸ’œβœ¨ bye mwah πŸ’…

πŸ“¦ where this page comes from