OSDN Git Service
msm_serial_hs: Change resource voting and system suspend logic
As part of the resource voting, both the resource_vote and unvote
functions call the toggle_wakeup_interrupt() function which toggles the
state of the wakeup irq unconditionally. This can cause issues in adverse
scenarios. Instead split this out into exclusive enable and disable wakeup
interrupt functions to be called during the resource unvote and vote
respectively. Also don't make resource votes in the wakeup isr, the
wakeup isr injects a pre-determined byte into the tty flip buffer and
doesn't access the core or setup any transactions and hence doesn't need
to vote for resources.
The driver has registered for the noirq system suspend/resume callbacks.
When executing these callbacks, don't rely on the runtime framework to
check the device's current runtime state before deciding whether to allow
system suspend or not as the runtime framework is disabled at this point.
Instead rely on the power state that the driver maintains internally.
Change-Id: I0e5d6b8a8a69efc2d9c65dc1edc85f13cbc94fc3
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>