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
cd6cad55
Commit
cd6cad55
authored
Aug 10, 2020
by
Jiri Kosina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-5.9/intel-ish' into for-linus
parents
a66eebd7
7e341061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
drivers/hid/intel-ish-hid/ipc/pci-ish.c
drivers/hid/intel-ish-hid/ipc/pci-ish.c
+11
-5
No files found.
drivers/hid/intel-ish-hid/ipc/pci-ish.c
View file @
cd6cad55
...
...
@@ -106,6 +106,11 @@ static inline bool ish_should_enter_d0i3(struct pci_dev *pdev)
return
!
pm_suspend_via_firmware
()
||
pdev
->
device
==
CHV_DEVICE_ID
;
}
static
inline
bool
ish_should_leave_d0i3
(
struct
pci_dev
*
pdev
)
{
return
!
pm_resume_via_firmware
()
||
pdev
->
device
==
CHV_DEVICE_ID
;
}
/**
* ish_probe() - PCI driver probe callback
* @pdev: pci device
...
...
@@ -215,9 +220,7 @@ static void __maybe_unused ish_resume_handler(struct work_struct *work)
struct
ishtp_device
*
dev
=
pci_get_drvdata
(
pdev
);
int
ret
;
/* Check the NO_D3 flag to distinguish the resume paths */
if
(
pdev
->
dev_flags
&
PCI_DEV_FLAGS_NO_D3
)
{
pdev
->
dev_flags
&=
~
PCI_DEV_FLAGS_NO_D3
;
if
(
ish_should_leave_d0i3
(
pdev
)
&&
!
dev
->
suspend_flag
)
{
disable_irq_wake
(
pdev
->
irq
);
ishtp_send_resume
(
dev
);
...
...
@@ -281,8 +284,11 @@ static int __maybe_unused ish_suspend(struct device *device)
*/
ish_disable_dma
(
dev
);
}
else
{
/* Set the NO_D3 flag, the ISH would enter D0i3 */
pdev
->
dev_flags
|=
PCI_DEV_FLAGS_NO_D3
;
/*
* Save state so PCI core will keep the device at D0,
* the ISH would enter D0i3
*/
pci_save_state
(
pdev
);
enable_irq_wake
(
pdev
->
irq
);
}
...
...
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