diff options
author | Girish Mahadevan <girishm@codeaurora.org> | 2016-02-11 15:28:31 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:04:18 -0700 |
commit | b39662b7c399ef773b8a089fe1ba562a6f01aef2 (patch) | |
tree | a1212dac8bece49a7128e7733817d59854ac5a98 /include | |
parent | 18076633657f3cc4fdebbe49935f4e26327071d1 (diff) |
msm_serial_hs: Fix race condition blocking suspend and remove wakeup source
The __pm_stay_awake/relax() calls were moved to runtime callbacks as a
means to fix data loss due to race conditions between incoming userspace
commands and executing PM related callbacks.
However calling the __pm_relax (to notify wakeup event processing)
as part of the runtime suspend callback could be race prone between
the system suspend and the runtime framework. If the system suspend
gets to run before the runtime callback, the wakeup event will block
system suspend.
Remove the use of the wakeup source altogether, instead do these:
1. Block system suspend based on the current clk request count and the
RPM state of the device (to detect potential inbound userspace
requests).
2. If the driver is in the process of executing the system suspend
callback, ignore any userspace requests.
3. If the client calls a shutdown without an unvote ioctl, zero out
the client_count vote forcefully to allow suspend.
CRs-Fixed: 977421
Change-Id: I17de85f29b555c1a4563dd59bec3ba3084c3604f
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/msm_serial_hs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/platform_data/msm_serial_hs.h b/include/linux/platform_data/msm_serial_hs.h index 4362b4ac103d..bc1f3e091d86 100644 --- a/include/linux/platform_data/msm_serial_hs.h +++ b/include/linux/platform_data/msm_serial_hs.h @@ -55,8 +55,8 @@ struct msm_serial_hs_platform_data { /* return true when tx is empty */ unsigned int msm_hs_tx_empty(struct uart_port *uport); -void msm_hs_request_clock_off(struct uart_port *uport); -void msm_hs_request_clock_on(struct uart_port *uport); +int msm_hs_request_clock_off(struct uart_port *uport); +int msm_hs_request_clock_on(struct uart_port *uport); struct uart_port *msm_hs_get_uart_port(int port_index); void msm_hs_set_mctrl(struct uart_port *uport, unsigned int mctrl); |