summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArun Kumar Neelakantam <aneela@codeaurora.org>2017-05-26 17:57:52 +0530
committerArun Kumar Neelakantam <aneela@codeaurora.org>2017-06-07 11:34:08 +0530
commit10ed66867a47e843a14393017b8d40204311557e (patch)
tree83d9aed6bc8fc581e434527fce168c1df32634ef /include
parentccde34ffb3f4e58f6885a6489c7e2eaeb7eca5e9 (diff)
net: ipc_router: Add dynamic enable/disable wakeup source feature
By default IPC Router core uses edge and port specific wakeup sources which are blocking system suspend in special use cases like streaming non wakeup sensors data at high speed. Add dynamic wakeup source enable/disable functionality to acquire the wakeup source only during the APPS suspend stage. CRs-Fixed: 2057391 Change-Id: I2a5ea4e2c31432a9dd195c702ef7001b26eed33d Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipc_router.h12
-rw-r--r--include/linux/ipc_router_xprt.h6
2 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/ipc_router.h b/include/linux/ipc_router.h
index b17f684a9895..04a06df66d4b 100644
--- a/include/linux/ipc_router.h
+++ b/include/linux/ipc_router.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2015,2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -269,6 +269,14 @@ int register_ipcrtr_af_init_notifier(struct notifier_block *nb);
*/
int unregister_ipcrtr_af_init_notifier(struct notifier_block *nb);
+/**
+ * msm_ipc_router_set_ws_allowed() - To Enable/disable the wakeup source allowed
+ * flag
+ * @flag: Flag to set/clear the wakeup soruce allowed
+ *
+ */
+void msm_ipc_router_set_ws_allowed(bool flag);
+
#else
struct msm_ipc_port *msm_ipc_router_create_port(
@@ -341,6 +349,8 @@ int unregister_ipcrtr_af_init_notifier(struct notifier_block *nb)
return -ENODEV;
}
+void msm_ipc_router_set_ws_allowed(bool flag) { }
+
#endif
#endif
diff --git a/include/linux/ipc_router_xprt.h b/include/linux/ipc_router_xprt.h
index 276c79ff1591..ac6c1e4db8a4 100644
--- a/include/linux/ipc_router_xprt.h
+++ b/include/linux/ipc_router_xprt.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2015,2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -100,6 +100,7 @@ struct rr_opt_hdr {
* @pkt_fragment_q: Queue of SKBs containing payload.
* @length: Length of data in the chain of SKBs
* @ref: Reference count for the packet.
+ * @ws_need: Flag to check wakeup soruce need
*/
struct rr_packet {
struct list_head list;
@@ -108,6 +109,7 @@ struct rr_packet {
struct sk_buff_head *pkt_fragment_q;
uint32_t length;
struct kref ref;
+ bool ws_need;
};
/**
@@ -125,6 +127,7 @@ struct rr_packet {
* @close: Method to close the XPRT.
* @sft_close_done: Method to indicate to the XPRT that handling of reset
* event is complete.
+ * @get_ws_info: Method to get the wakeup soruce inforamtion of the XPRT
*/
struct msm_ipc_router_xprt {
char *name;
@@ -143,6 +146,7 @@ struct msm_ipc_router_xprt {
struct msm_ipc_router_xprt *xprt);
int (*close)(struct msm_ipc_router_xprt *xprt);
void (*sft_close_done)(struct msm_ipc_router_xprt *xprt);
+ bool (*get_ws_info)(struct msm_ipc_router_xprt *xprt);
};
void msm_ipc_router_xprt_notify(struct msm_ipc_router_xprt *xprt,