aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/button-hotplug
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-04 13:31:09 +0000
committerJohn Crispin <blogic@openwrt.org>2013-07-04 13:31:09 +0000
commitee878c1e839c1e0c9718203c7c5a35acacacde26 (patch)
tree82f2b6a297ad23998704f69b9e2c0ded7bee726c /package/kernel/button-hotplug
parent749b84769aead788d98b69767876a57cbe86ce92 (diff)
downloadupstream-ee878c1e839c1e0c9718203c7c5a35acacacde26.tar.gz
upstream-ee878c1e839c1e0c9718203c7c5a35acacacde26.tar.bz2
upstream-ee878c1e839c1e0c9718203c7c5a35acacacde26.zip
button-hotplug: Add KEY_POWER handling
When running OpenWrt within KVM KEY_POWER is generated from the ACPI button driver when restarting or powering down the VM. Extend button-hotplug to allow user space handlers for these events. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Patchwork: http://patchwork.openwrt.org/patch/3799/ git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37160 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/button-hotplug')
-rw-r--r--package/kernel/button-hotplug/src/button-hotplug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/kernel/button-hotplug/src/button-hotplug.c b/package/kernel/button-hotplug/src/button-hotplug.c
index 4a8c4a88ed..684a0c6e3d 100644
--- a/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/package/kernel/button-hotplug/src/button-hotplug.c
@@ -84,6 +84,7 @@ static struct bh_map button_map[] = {
BH_MAP(BTN_8, "BTN_8"),
BH_MAP(BTN_9, "BTN_9"),
BH_MAP(KEY_RESTART, "reset"),
+ BH_MAP(KEY_POWER, "power"),
#ifdef KEY_WPS_BUTTON
BH_MAP(KEY_WPS_BUTTON, "wps"),
#endif /* KEY_WPS_BUTTON */