diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2006-06-26 01:49:55 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-06-26 01:49:55 -0400 |
commit | 9e8e30a0cc0ccb43773d14d8b8b84bcc585e9cc1 (patch) | |
tree | 0e5c5a6b28953b934d4533d330f51af740c0399e /drivers/macintosh/via-pmu.c | |
parent | ca56fe07f46e1c174b544e714be183f1476fecea (diff) | |
download | linux-stable-9e8e30a0cc0ccb43773d14d8b8b84bcc585e9cc1.tar.gz linux-stable-9e8e30a0cc0ccb43773d14d8b8b84bcc585e9cc1.tar.bz2 linux-stable-9e8e30a0cc0ccb43773d14d8b8b84bcc585e9cc1.zip |
Input: via-pmu - add input device support
Add an input device for the button and lid switch so that userspace gets
notified about the user pressing them via the standard input layer.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 2a355ae59562..1ab4f16c08b9 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -69,6 +69,8 @@ #include <asm/open_pic.h> #endif +#include "via-pmu-event.h" + /* Some compile options */ #undef SUSPEND_USES_PMU #define DEBUG_SLEEP @@ -1427,6 +1429,12 @@ next: if (pmu_battery_count) query_battery_state(); pmu_pass_intr(data, len); + /* len == 6 is probably a bad check. But how do I + * know what PMU versions send what events here? */ + if (len == 6) { + via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); + via_pmu_event(PMU_EVT_LID, data[1]&1); + } } else { pmu_pass_intr(data, len); } |