From patchwork Wed Aug 22 08:44:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1360601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 146A73FD40 for ; Wed, 22 Aug 2012 08:49:34 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T46Zg-0006lW-5Q; Wed, 22 Aug 2012 08:46:04 +0000 Received: from eu1sys200aog112.obsmtp.com ([207.126.144.133]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T46YB-000616-G0 for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2012 08:44:37 +0000 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob112.postini.com ([207.126.147.11]) with SMTP ID DSNKUDSb66uEZ0BIDHG0u+/85Q7yWh6wTTyn@postini.com; Wed, 22 Aug 2012 08:44:31 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B71E9D2; Wed, 22 Aug 2012 08:44:26 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6ADA52729; Wed, 22 Aug 2012 08:44:26 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 69DFCA8065; Wed, 22 Aug 2012 10:44:22 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 22 Aug 2012 10:44:26 +0200 From: Linus Walleij To: , , Samuel Ortiz Subject: [PATCH 6/7] mfd/stmpe: MASK_ON_SUSPEND Date: Wed, 22 Aug 2012 10:44:23 +0200 Message-ID: <1345625063-5784-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.126.144.133 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Linus Walleij , Etienne Carriere X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Etienne Carriere ux500 machines performs pins (GPIO) reconfiguration when entering in the suspended mode. This reconfiguration aims at reaching an ultra low power HW configuration. Due to this HW reconfiguration, some HW devices can change of HW state and have their output signals at level that could generate IRQs. If the non-wakeup IRQs are disabled but not yet masked (delayed interrupt disable feature from the generic irq layer), effective interrupts reach the system only because the system attempt to enter the suspended mode. To prevent such IRQs to trig, all irq chips embedded in ux500 platform should enable their IRQCHIP_MASK_ON_SUSPEND flag. Cc: Samuel Ortiz Signed-off-by: Etienne Carriere Signed-off-by: Linus Walleij --- drivers/gpio/gpio-stmpe.c | 1 + drivers/mfd/stmpe.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index dce3472..2195abc 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c @@ -223,6 +223,7 @@ static struct irq_chip stmpe_gpio_irq_chip = { .irq_mask = stmpe_gpio_irq_mask, .irq_unmask = stmpe_gpio_irq_unmask, .irq_set_type = stmpe_gpio_irq_set_type, + .flags = IRQCHIP_MASK_ON_SUSPEND, }; static irqreturn_t stmpe_gpio_irq(int irq, void *dev) diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 2dd8d49..846b9c8 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -851,6 +851,7 @@ static struct irq_chip stmpe_irq_chip = { .irq_bus_sync_unlock = stmpe_irq_sync_unlock, .irq_mask = stmpe_irq_mask, .irq_unmask = stmpe_irq_unmask, + .flags = IRQCHIP_MASK_ON_SUSPEND, }; static int __devinit stmpe_irq_init(struct stmpe *stmpe)