aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-01-06 17:36:01 -0500
committerLen Brown <len.brown@intel.com>2011-01-07 01:18:16 -0500
commit1f83511bd8f44b8a9e2d82263b2c95f26a625fcc (patch)
treea366443928ec8b96932a5d61074d7af43de1a188
parent7fa69baf29de8c77a6b32c054df2abb8f11f8aa4 (diff)
ACPI / PM: Report wakeup events from buttons
Since ACPI buttons and lids can be configured to wake up the system from sleep states, report wakeup events from these devices. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/button.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 234c104fcdd8..76bbb78a5ad9 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -279,6 +279,9 @@ static int acpi_lid_send_state(struct acpi_device *device)
279 input_report_switch(button->input, SW_LID, !state); 279 input_report_switch(button->input, SW_LID, !state);
280 input_sync(button->input); 280 input_sync(button->input);
281 281
282 if (state)
283 pm_wakeup_event(&device->dev, 0);
284
282 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); 285 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device);
283 if (ret == NOTIFY_DONE) 286 if (ret == NOTIFY_DONE)
284 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, 287 ret = blocking_notifier_call_chain(&acpi_lid_notifier, state,
@@ -314,6 +317,8 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
314 input_sync(input); 317 input_sync(input);
315 input_report_key(input, keycode, 0); 318 input_report_key(input, keycode, 0);
316 input_sync(input); 319 input_sync(input);
320
321 pm_wakeup_event(&device->dev, 0);
317 } 322 }
318 323
319 acpi_bus_generate_proc_event(device, event, ++button->pushed); 324 acpi_bus_generate_proc_event(device, event, ++button->pushed);