From patchwork Sun Oct 28 15:46:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 1657891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id C8B5EDFABE for ; Sun, 28 Oct 2012 15:47:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TSV46-00077s-0j; Sun, 28 Oct 2012 15:46:18 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TSV42-00077C-SC for linux-arm-kernel@lists.infradead.org; Sun, 28 Oct 2012 15:46:15 +0000 Received: by mail-la0-f49.google.com with SMTP id z14so3192773lag.36 for ; Sun, 28 Oct 2012 08:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=qhEMWwtnihlGtbR418KrZmGjQ1bGYWUDbOWxjLDelRM=; b=zv6so1XNgrHkqnHKvNJwVX8AF0r8hrCQn5fLwiAbRwp/aC+vE9WlX0AJdUjpN1Imfj DsqIG4qaMSX9OYiNWf86hMIzgGu4UuLjJKIVxnRBVbjlbA3WAwDAsPeqk32yfe3DIvts F8HT4GyMMfY2g7UEcQW1nIDl8oIEoSLQWTfBhHinmtGFVTkVFp819OoSJIx0c8fOvxkD KfRtTpy2QrBaEgjC0GKgOtkFB9dVXRn64gj4B2/Dfztqjbi9t6bNzKHISmiZIN1YV6lQ S4XI8n5SlD3y5U+Hdwy+dlrVQDr8Hbb+0IDKz4KYle4Oe8EWtZ2u4Jp/0uWbMkm8COs5 /REQ== Received: by 10.112.83.73 with SMTP id o9mr10858203lby.128.1351439173334; Sun, 28 Oct 2012 08:46:13 -0700 (PDT) Received: from localhost.localdomain ([80.249.90.60]) by mx.google.com with ESMTPS id oz12sm2195210lab.17.2012.10.28.08.46.10 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Oct 2012 08:46:12 -0700 (PDT) From: Vasily Khoruzhick To: Dmitry Torokhov , Chao Xie , Haojian Zhuang , Mark Brown , Robert Jarzmik , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND] ARM: pxa27x_keypad: clear pending interrupts on keypad config Date: Sun, 28 Oct 2012 18:46:03 +0300 Message-Id: <1351439163-9575-1-git-send-email-anarsoul@gmail.com> X-Mailer: git-send-email 1.7.12.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (anarsoul[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Vasily Khoruzhick 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Bootloader can leave interrupt bit pending, and it confuses driver. Signed-off-by: Vasily Khoruzhick Acked-by: Robert Jarzmik --- Rebased against v3.7-rc2 drivers/input/keyboard/pxa27x_keypad.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 803ff6f..cad9d5d 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -368,6 +368,9 @@ static void pxa27x_keypad_config(struct pxa27x_keypad *keypad) unsigned int mask = 0, direct_key_num = 0; unsigned long kpc = 0; + /* clear pending interrupt bit */ + keypad_readl(KPC); + /* enable matrix keys with automatic scan */ if (pdata->matrix_key_rows && pdata->matrix_key_cols) { kpc |= KPC_ASACT | KPC_MIE | KPC_ME | KPC_MS_ALL;