From patchwork Tue Sep 15 16:28:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 7187981 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C73379F444 for ; Tue, 15 Sep 2015 16:28:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0253520645 for ; Tue, 15 Sep 2015 16:28:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE87F206EB for ; Tue, 15 Sep 2015 16:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752334AbbIOQ2V (ORCPT ); Tue, 15 Sep 2015 12:28:21 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:58346 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbbIOQ2S (ORCPT ); Tue, 15 Sep 2015 12:28:18 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8FGSHpd006111; Tue, 15 Sep 2015 11:28:17 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8FGSGTJ020004; Tue, 15 Sep 2015 11:28:16 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 15 Sep 2015 11:28:16 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8FGSGlC013688; Tue, 15 Sep 2015 11:28:16 -0500 Received: from localhost (uda0274052.am.dhcp.ti.com [128.247.9.225]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id t8FGSG913852; Tue, 15 Sep 2015 11:28:16 -0500 (CDT) From: Dave Gerlach To: , CC: Dmitry Torokhov , Vignesh R , Sekhar Nori , Dave Gerlach Subject: [PATCH] input: touchscreen: ti_am335x_tsc: Fix HWPEN interrupt handling Date: Tue, 15 Sep 2015 11:28:09 -0500 Message-ID: <1442334489-3645-1-git-send-email-d-gerlach@ti.com> X-Mailer: git-send-email 2.4.6 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove write to REG_IRQCLR and REG_IRQWAKEUP in interrupt handler for IRQENB_HW_PEN as the resume handler should and does clear REG_IRQWAKEUP. IRQENB_HW_PEN bit is set in irqclr so that all interrupts get cleared later so let IRQENB_HW_PEN be cleared by that. Without this patch wakeup events from TSC_ADC do not work because pending interrupts in TSC_ADC were causing HW_PEN interrupt, needed for wake from suspend modes, to get disabled immediately by IRQ handler after being enabled and preventing wake from happening. Signed-off-by: Dave Gerlach --- drivers/input/touchscreen/ti_am335x_tsc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 191a1b8..a21a07c 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -273,8 +273,6 @@ static irqreturn_t titsc_irq(int irq, void *dev) status = titsc_readl(ts_dev, REG_RAWIRQSTATUS); if (status & IRQENB_HW_PEN) { ts_dev->pen_down = true; - titsc_writel(ts_dev, REG_IRQWAKEUP, 0x00); - titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN); irqclr |= IRQENB_HW_PEN; }