Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit19351f3

Browse files
committed
platform/x86: surfacepro3: Support for wakeup from suspend-to-idle
Modify surface_button_notify() to make it wake up the system fromsuspend-to-idle (by reporting "hard" wakeup events while suspended)and add wakeup initialization to surface_button_add() for wakeupevents reported by this driver to work at all.Link:https://bugzilla.kernel.org/show_bug.cgi?id=198389Reported-by: Valentin Manea <valy@mrs.ro>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>Tested-by: Valentin Manea <valy@mrs.ro>
1 parent29a5a6d commit19351f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎drivers/platform/x86/surfacepro3_button.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static void surface_button_notify(struct acpi_device *device, u32 event)
119119
if (key_code==KEY_RESERVED)
120120
return;
121121
if (pressed)
122-
pm_wakeup_event(&device->dev,0);
122+
pm_wakeup_dev_event(&device->dev,0,button->suspended);
123123
if (button->suspended)
124124
return;
125125
input_report_key(input,key_code,pressed?1:0);
@@ -185,6 +185,8 @@ static int surface_button_add(struct acpi_device *device)
185185
error=input_register_device(input);
186186
if (error)
187187
gotoerr_free_input;
188+
189+
device_init_wakeup(&device->dev, true);
188190
dev_info(&device->dev,
189191
"%s [%s]\n",name,acpi_device_bid(device));
190192
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp