From patchwork Wed Jul 20 08:29:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 9239117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE799600CB for ; Wed, 20 Jul 2016 08:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F20220246 for ; Wed, 20 Jul 2016 08:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 937972787C; Wed, 20 Jul 2016 08:32:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 29B2D20499 for ; Wed, 20 Jul 2016 08:32:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPmtc-00056z-UC; Wed, 20 Jul 2016 08:30:24 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPmtS-0003uT-8K for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2016 08:30:15 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id E4FE6603; Wed, 20 Jul 2016 10:29:52 +0200 (CEST) Received: from quentin-Latitude-E6320.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 7E5681BC; Wed, 20 Jul 2016 10:29:42 +0200 (CEST) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, maxime.ripard@free-electrons.com, wens@csie.org, dmitry.torokhov@gmail.com, lee.jones@linaro.org Subject: [PATCH 1/5] mfd: sunxi-gpadc-mfd: add TP_UP_PENDING irq Date: Wed, 20 Jul 2016 10:29:07 +0200 Message-Id: <1469003351-15263-2-git-send-email-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1469003351-15263-1-git-send-email-quentin.schulz@free-electrons.com> References: <1469003351-15263-1-git-send-email-quentin.schulz@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160720_013014_480156_CDB8693C X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, linux-iio@vger.kernel.org, antoine.tenart@free-electrons.com, linux-kernel@vger.kernel.org, Quentin Schulz , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds support for TP_UP_PENDING irq in Allwinner SoCs' GPADC's MFD. This interrupt occurs when a touchscreen is attached and the thing (stylus, finger) currently touching the touchscreen releases the touch. Signed-off-by: Quentin Schulz --- drivers/mfd/sunxi-gpadc-mfd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mfd/sunxi-gpadc-mfd.c b/drivers/mfd/sunxi-gpadc-mfd.c index f0005a6..05a000b 100644 --- a/drivers/mfd/sunxi-gpadc-mfd.c +++ b/drivers/mfd/sunxi-gpadc-mfd.c @@ -19,6 +19,8 @@ #define SUNXI_IRQ_FIFO_DATA 0 #define SUNXI_IRQ_TEMP_DATA 1 +#define SUNXI_IRQ_TP_UP 2 + static struct resource adc_resources[] = { { @@ -34,9 +36,19 @@ static struct resource adc_resources[] = { }, }; +static struct resource ts_resources[] = { + { + .name = "TP_UP_PENDING", + .start = SUNXI_IRQ_TP_UP, + .end = SUNXI_IRQ_TP_UP, + .flags = IORESOURCE_IRQ, + }, +}; + static const struct regmap_irq sunxi_gpadc_mfd_regmap_irq[] = { REGMAP_IRQ_REG(SUNXI_IRQ_FIFO_DATA, 0, BIT(16)), REGMAP_IRQ_REG(SUNXI_IRQ_TEMP_DATA, 0, BIT(18)), + REGMAP_IRQ_REG(SUNXI_IRQ_TP_UP, 0, BIT(1)), }; static const struct regmap_irq_chip sunxi_gpadc_mfd_regmap_irq_chip = {