]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PM: Introduce new PMSG_POWEROFF event
authorMario Limonciello (AMD) <superm1@kernel.org>
Wed, 12 Nov 2025 22:40:23 +0000 (16:40 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 14 Nov 2025 16:05:53 +0000 (17:05 +0100)
commit0ca04993dac9b0d21ffbfd22bf54cc43ec2c49f2
tree28003ab9b72ebaf9b2a97a96801e82cb99d88763
parent9cf02802d60af2ab52fc5f6d015baae946c85072
PM: Introduce new PMSG_POWEROFF event

PMSG_POWEROFF will be used for the PM core to allow differentiating between
a hibernation or shutdown sequence when re-using callbacks for common code.

Hibernation is started by writing a hibernation method (such as 'platform'
'shutdown', or 'reboot') to use into /sys/power/disk and writing 'disk' to
/sys/power/state.

Shutdown is initiated with the reboot() syscall with arguments on whether
to halt the system or power it off.

Tested-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251112224025.2051702-2-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/main.c
include/linux/pm.h
include/trace/events/power.h