mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
drivers: qcom: sdx_ext_ipc: keep wakeup irq always on
When suspend is in progress on local processor, if remote processor toggles GPIO to indicate a resume event to local processor, this event may get lost. This commit addresses this situation. 1. Add IRQF_NO_SUSPEND flag so that wakeup_irq is not disabled during suspend on local processor. 2. Install primary handler that inform pm core that a system wakeup event has happened. The pm core can then abort a suspend in progress. Change-Id: I8d84f15a118c4630bde7b9db35ffadddeb937cb9 Signed-off-by: Pavankumar Vijapur <pvijapur@codeaurora.org> Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
This commit is contained in:
parent
15614d336d
commit
445f77d01d
1 changed files with 10 additions and 3 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <soc/qcom/sb_notification.h>
|
||||
|
||||
#define STATUS_UP 1
|
||||
|
|
@ -304,6 +305,12 @@ static int sdx_ext_ipc_panic(struct notifier_block *this,
|
|||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static irqreturn_t hw_irq_handler(int irq, void *p)
|
||||
{
|
||||
pm_system_wakeup();
|
||||
return IRQ_WAKE_THREAD;
|
||||
}
|
||||
|
||||
static int sdx_ext_ipc_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -371,9 +378,9 @@ static int sdx_ext_ipc_probe(struct platform_device *pdev)
|
|||
|
||||
if (mdm->gpios[WAKEUP_IN] >= 0) {
|
||||
ret = devm_request_threaded_irq(mdm->dev, mdm->wakeup_irq,
|
||||
sdx_ext_ipc_wakeup_irq, NULL,
|
||||
IRQF_TRIGGER_FALLING, "sdx_ext_ipc_wakeup",
|
||||
mdm);
|
||||
hw_irq_handler, sdx_ext_ipc_wakeup_irq,
|
||||
IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
|
||||
IRQF_NO_SUSPEND, "sdx_ext_ipc_wakeup", mdm);
|
||||
if (ret < 0) {
|
||||
dev_err(mdm->dev,
|
||||
"%s: WAKEUP_IN IRQ#%d request failed,\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue