Commit Graph

3 Commits

Author SHA1 Message Date
Hanjun Guo 907cc9fefe ACPI: tiny-power-button: Simplify the code using module_acpi_driver()
Using module_acpi_driver() to simplify the code.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-11-17 18:12:34 +01:00
Hanjun Guo b16cd57ebc ACPI: tiny-power-button: Remove dead ACPICA debug code
The ACPICA debug code is not used, can be removed.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-25 18:25:51 +02:00
Josh Triplett a1b93e890d 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>
2020-02-13 23:36:23 +01:00