summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/Kconfig
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2020-02-11 15:38:06 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-02-13 23:36:23 +0100
commita1b93e890d4f3e8c134095b52954bfbccaea29a6 (patch)
treeb07606f1c4948f1f668931f44ae4afa979d8c166 /drivers/acpi/Kconfig
parentac1cc6b4856ffa7ecb818b3ceb82bfc43597d613 (diff)
downloadlinux-a1b93e890d4f3e8c134095b52954bfbccaea29a6.tar.bz2
ACPI: Add new tiny-power-button driver to directly signal init
Virtual machines often use an ACPI power button event to tell the machine to shut down gracefully. Provide an extremely lightweight "tiny power button" driver to handle this event by signaling init directly, rather than running a separate daemon (such as acpid or systemd-logind) that adds to startup time and VM image complexity. The kernel configuration defines the default signal to send init, and userspace can change this signal via a module parameter. Suggested-by: "Rafael J. Wysocki" <rafael@kernel.org> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/Kconfig')
-rw-r--r--drivers/acpi/Kconfig24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index cc57bab146b5..ce2730d61a8f 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -190,6 +190,30 @@ config ACPI_BUTTON
To compile this driver as a module, choose M here:
the module will be called button.
+config ACPI_TINY_POWER_BUTTON
+ tristate "Tiny Power Button Driver"
+ depends on !ACPI_BUTTON
+ help
+ This driver provides a tiny alternative to the ACPI Button driver.
+ The tiny power button driver only handles the power button. Rather
+ than notifying userspace via the input layer or a netlink event, this
+ driver directly signals the init process to shut down.
+
+ This driver is particularly suitable for cloud and VM environments,
+ which use a simulated power button to initiate a controlled poweroff,
+ but which may not want to run a separate userspace daemon to process
+ input events.
+
+config ACPI_TINY_POWER_BUTTON_SIGNAL
+ int "Tiny Power Button Signal"
+ depends on ACPI_TINY_POWER_BUTTON
+ default 38
+ help
+ Default signal to send to init in response to the power button.
+
+ Likely values here include 38 (SIGRTMIN+4) to power off, or 2
+ (SIGINT) to simulate Ctrl+Alt+Del.
+
config ACPI_VIDEO
tristate "Video"
depends on X86 && BACKLIGHT_CLASS_DEVICE