summaryrefslogtreecommitdiff
path: root/include/linux/intel-ish-client-if.h
diff options
context:
space:
mode:
authorYe Xiang <xiang.ye@intel.com>2021-06-13 11:25:07 +0800
committerJiri Kosina <jkosina@suse.cz>2021-07-15 20:49:09 +0200
commite48bf29cf9d6d60d810e2af71e54b71a324094e0 (patch)
treeaccc6d0cf319fcbb302e9ef2988e7f1fa22057d3 /include/linux/intel-ish-client-if.h
parentdf04fbe8680bfe07f3d7487eccff9f768bb02533 (diff)
HID: intel-ish-hid: use async resume function
ISH IPC driver uses asynchronous workqueue to do resume now, but there is a potential timing issue: when child devices resume before bus driver, it will cause child devices resume failed and cannot be recovered until reboot. The current implementation in this case do wait for IPC to resume but fail to accommodate for a case when there is no ISH reboot and soft resume is taking time. This issue is apparent on Tiger Lake platform with 5.11.13 kernel when doing suspend to idle then resume(s0ix) test. To resolve this issue, we change ISHTP HID client to use asynchronous resume callback too. In the asynchronous resume callback, it waits for the ISHTP resume done event, and then notify ISHTP HID client link ready. Signed-off-by: Ye Xiang <xiang.ye@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/intel-ish-client-if.h')
-rw-r--r--include/linux/intel-ish-client-if.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/intel-ish-client-if.h b/include/linux/intel-ish-client-if.h
index 25e2b4e80502..aee8ff4739b1 100644
--- a/include/linux/intel-ish-client-if.h
+++ b/include/linux/intel-ish-client-if.h
@@ -81,6 +81,8 @@ int ishtp_register_event_cb(struct ishtp_cl_device *device,
/* Get the device * from ishtp device instance */
struct device *ishtp_device(struct ishtp_cl_device *cl_device);
+/* wait for IPC resume */
+bool ishtp_wait_resume(struct ishtp_device *dev);
/* Trace interface for clients */
ishtp_print_log ishtp_trace_callback(struct ishtp_cl_device *cl_device);
/* Get device pointer of PCI device for DMA acces */