diff options
author | John Crispin <john@openwrt.org> | 2013-07-04 13:31:09 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-07-04 13:31:09 +0000 |
commit | e15a16bfd7e38d1fd3eb39077286b9a6b2a5e917 (patch) | |
tree | 295256bca963c4d671bf1247b0f00cc522872960 | |
parent | 6bd071724c140f5703822af694d58fc1f2f9482e (diff) | |
download | mtk-20170518-e15a16bfd7e38d1fd3eb39077286b9a6b2a5e917.zip mtk-20170518-e15a16bfd7e38d1fd3eb39077286b9a6b2a5e917.tar.gz mtk-20170518-e15a16bfd7e38d1fd3eb39077286b9a6b2a5e917.tar.bz2 |
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/
SVN-Revision: 37160
-rw-r--r-- | package/kernel/button-hotplug/src/button-hotplug.c | 1 |
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 4a8c4a8..684a0c6 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 */ |