diff options
-rw-r--r-- | goodix_brl_hw.c | 2 | ||||
-rw-r--r-- | goodix_ts_core.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c index 9b0d384..d9e3657 100644 --- a/goodix_brl_hw.c +++ b/goodix_brl_hw.c @@ -344,7 +344,7 @@ static int brl_irq_enable(struct goodix_ts_core *cd, bool enable) } if (!enable && atomic_cmpxchg(&cd->irq_enabled, 1, 0)) { - disable_irq(cd->irq); + disable_irq_nosync(cd->irq); ts_debug("Irq disabled"); return 0; } diff --git a/goodix_ts_core.c b/goodix_ts_core.c index 44291c8..7314868 100644 --- a/goodix_ts_core.c +++ b/goodix_ts_core.c @@ -1871,7 +1871,11 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data) int ret; #if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM) - goog_pm_wake_lock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ, true); + ret = goog_pm_wake_lock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ, true); + if(ret < 0) { + ts_err("Error while obtaing IRQ wakelock: %d!\n", ret); + return IRQ_HANDLED; + } #endif ts_esd->irq_status = true; @@ -1886,7 +1890,7 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data) if (ret == EVT_CANCEL_IRQEVT) { mutex_unlock(&goodix_modules.mutex); #if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM) - goog_pm_wake_unlock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ); + goog_pm_wake_unlock_nosync(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ); #endif return IRQ_HANDLED; } @@ -1925,7 +1929,7 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data) } #if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE) && IS_ENABLED(CONFIG_GTI_PM) - goog_pm_wake_unlock(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ); + goog_pm_wake_unlock_nosync(core_data->gti, GTI_PM_WAKELOCK_TYPE_IRQ); #endif return IRQ_HANDLED; |