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
6ed86005
Commit
6ed86005
authored
Jul 20, 2017
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'acpi-ec' into acpi-pm
parents
5771a8c0
76380636
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
drivers/acpi/ec.c
drivers/acpi/ec.c
+31
-0
No files found.
drivers/acpi/ec.c
View file @
6ed86005
...
...
@@ -151,6 +151,10 @@ static bool ec_freeze_events __read_mostly = false;
module_param
(
ec_freeze_events
,
bool
,
0644
);
MODULE_PARM_DESC
(
ec_freeze_events
,
"Disabling event handling during suspend/resume"
);
static
bool
ec_no_wakeup
__read_mostly
;
module_param
(
ec_no_wakeup
,
bool
,
0644
);
MODULE_PARM_DESC
(
ec_no_wakeup
,
"Do not wake up from suspend-to-idle"
);
struct
acpi_ec_query_handler
{
struct
list_head
node
;
acpi_ec_query_func
func
;
...
...
@@ -1880,6 +1884,32 @@ static int acpi_ec_suspend(struct device *dev)
return
0
;
}
static
int
acpi_ec_suspend_noirq
(
struct
device
*
dev
)
{
struct
acpi_ec
*
ec
=
acpi_driver_data
(
to_acpi_device
(
dev
));
/*
* The SCI handler doesn't run at this point, so the GPE can be
* masked at the low level without side effects.
*/
if
(
ec_no_wakeup
&&
test_bit
(
EC_FLAGS_STARTED
,
&
ec
->
flags
)
&&
ec
->
reference_count
>=
1
)
acpi_set_gpe
(
NULL
,
ec
->
gpe
,
ACPI_GPE_DISABLE
);
return
0
;
}
static
int
acpi_ec_resume_noirq
(
struct
device
*
dev
)
{
struct
acpi_ec
*
ec
=
acpi_driver_data
(
to_acpi_device
(
dev
));
if
(
ec_no_wakeup
&&
test_bit
(
EC_FLAGS_STARTED
,
&
ec
->
flags
)
&&
ec
->
reference_count
>=
1
)
acpi_set_gpe
(
NULL
,
ec
->
gpe
,
ACPI_GPE_ENABLE
);
return
0
;
}
static
int
acpi_ec_resume
(
struct
device
*
dev
)
{
struct
acpi_ec
*
ec
=
...
...
@@ -1891,6 +1921,7 @@ static int acpi_ec_resume(struct device *dev)
#endif
static
const
struct
dev_pm_ops
acpi_ec_pm
=
{
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
(
acpi_ec_suspend_noirq
,
acpi_ec_resume_noirq
)
SET_SYSTEM_SLEEP_PM_OPS
(
acpi_ec_suspend
,
acpi_ec_resume
)
};
...
...
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