Commits
Benoit Parrot committed 07726863d0c
Input: edt-ft5x06: disable irq handling during suspend As a wakeup source when the system is in suspend there is little point trying to access a register across the i2c bus as it is still inactive. We need to prevent the irq handler from being called during suspend. Without this modification upon wakeup you would see the following kernel error: [ 118.733717] PM: Wakeup source GPIO0 [ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13 Few more explanation why this issue happens, just for info: - suspend: - dev suspend stage: - edt_ft5x06_ts_suspend() - omap i2c: nop - late stage: - omap i2c: pm_runtime is disabled for device - irqs disabled and masked (if not wakeup source) - noirq stage: - omap i2c: forced off [A] .... wake up ... - noirq resume: - omap i2c: forced on only if it was ON at point [A] - irqs enabled - at this moment TS IRQ triggered [B] and trying to enable omap i2c but PM runtime still disabled for it, so -EACCES (-13) - early resume: - omap i2c: pm_runtime is enabled for device - dev resume stage: - omap i2c: nop - edt_ft5x06_ts_resume() by disabling and then enabling TS IRQ here -> it will be kept disabled (but not masked) and marked as pending instead of triggering at point [B]. and, finally, re-triggered here as part of irq_enable() when everything is ready to handle it. Signed-off-by: Benoit Parrot <bparrot@ti.com>