Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a60b2399
Commit
a60b2399
authored
Jul 27, 2014
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'acpi-gpe'
* acpi-gpe: ACPI / scan: No implicit wake notification for buttons
parents
8989e1cc
bd9b2f9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
drivers/acpi/scan.c
drivers/acpi/scan.c
+16
-13
No files found.
drivers/acpi/scan.c
View file @
a60b2399
...
...
@@ -1421,14 +1421,13 @@ static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
wakeup
->
sleep_state
=
sleep_state
;
}
}
acpi_setup_gpe_for_wake
(
handle
,
wakeup
->
gpe_device
,
wakeup
->
gpe_number
);
out:
kfree
(
buffer
.
pointer
);
return
err
;
}
static
void
acpi_
bus_set_run_wake_flags
(
struct
acpi_device
*
device
)
static
void
acpi_
wakeup_gpe_init
(
struct
acpi_device
*
device
)
{
struct
acpi_device_id
button_device_ids
[]
=
{
{
"PNP0C0C"
,
0
},
...
...
@@ -1436,29 +1435,33 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
{
"PNP0C0E"
,
0
},
{
""
,
0
},
};
struct
acpi_device_wakeup
*
wakeup
=
&
device
->
wakeup
;
acpi_status
status
;
acpi_event_status
event_status
;
device
->
wakeup
.
flags
.
notifier_present
=
0
;
wakeup
->
flags
.
notifier_present
=
0
;
/* Power button, Lid switch always enable wakeup */
if
(
!
acpi_match_device_ids
(
device
,
button_device_ids
))
{
device
->
wakeup
.
flags
.
run_wake
=
1
;
wakeup
->
flags
.
run_wake
=
1
;
if
(
!
acpi_match_device_ids
(
device
,
&
button_device_ids
[
1
]))
{
/* Do not use Lid/sleep button for S5 wakeup */
if
(
device
->
wakeup
.
sleep_state
==
ACPI_STATE_S5
)
device
->
wakeup
.
sleep_state
=
ACPI_STATE_S4
;
if
(
wakeup
->
sleep_state
==
ACPI_STATE_S5
)
wakeup
->
sleep_state
=
ACPI_STATE_S4
;
}
acpi_mark_gpe_for_wake
(
wakeup
->
gpe_device
,
wakeup
->
gpe_number
);
device_set_wakeup_capable
(
&
device
->
dev
,
true
);
return
;
}
status
=
acpi_get_gpe_status
(
device
->
wakeup
.
gpe_device
,
device
->
wakeup
.
gpe_number
,
&
event_status
);
if
(
status
==
AE_OK
)
device
->
wakeup
.
flags
.
run_wake
=
!!
(
event_status
&
ACPI_EVENT_FLAG_HANDLE
);
acpi_setup_gpe_for_wake
(
device
->
handle
,
wakeup
->
gpe_device
,
wakeup
->
gpe_number
);
status
=
acpi_get_gpe_status
(
wakeup
->
gpe_device
,
wakeup
->
gpe_number
,
&
event_status
);
if
(
ACPI_FAILURE
(
status
))
return
;
wakeup
->
flags
.
run_wake
=
!!
(
event_status
&
ACPI_EVENT_FLAG_HANDLE
);
}
static
void
acpi_bus_get_wakeup_device_flags
(
struct
acpi_device
*
device
)
...
...
@@ -1478,7 +1481,7 @@ static void acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
device
->
wakeup
.
flags
.
valid
=
1
;
device
->
wakeup
.
prepare_count
=
0
;
acpi_
bus_set_run_wake_flags
(
device
);
acpi_
wakeup_gpe_init
(
device
);
/* Call _PSW/_DSW object to disable its ability to wake the sleeping
* system for the ACPI device with the _PRW object.
* The _PSW object is depreciated in ACPI 3.0 and is replaced by _DSW.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment