From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Andrzej Siewior Subject: [PATCH 18/21] input: ti_am335x_tsc: ACK the HW_PEN irq in ISR Date: Wed, 12 Jun 2013 18:58:19 +0200 Message-ID: <1371056302-12714-19-git-send-email-bigeasy@linutronix.de> References: <1371056302-12714-1-git-send-email-bigeasy@linutronix.de> Return-path: Received: from www.linutronix.de ([62.245.132.108]:44718 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932066Ab3FLRMp (ORCPT ); Wed, 12 Jun 2013 13:12:45 -0400 In-Reply-To: <1371056302-12714-1-git-send-email-bigeasy@linutronix.de> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Samuel Ortiz Cc: =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Jonathan Cameron , Dmitry Torokhov , Felipe Balbi , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Sebastian Andrzej Siewior The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to be used as a wake up source. Once this interrupt source is unmaksed, the devices ends up in ISR and never continues. This change ACKs the interrupt and disables it so the system does not freeze. Signed-off-by: Sebastian Andrzej Siewior --- drivers/input/touchscreen/ti_am335x_tsc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 1bceb25..2ba7703 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -308,6 +308,12 @@ static irqreturn_t titsc_irq(int irq, void *dev) irqclr |= IRQENB_PENUP; } + if (status & IRQENB_HW_PEN) { + + titsc_writel(ts_dev, REG_IRQWAKEUP, 0x00); + titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN); + } + titsc_writel(ts_dev, REG_IRQSTATUS, irqclr); am335x_tsc_se_update(ts_dev->mfd_tscadc); -- 1.7.10.4