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: 1657881 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ABEE83FD4E for ; Sun, 28 Oct 2012 15:46:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218Ab2J1PqP (ORCPT ); Sun, 28 Oct 2012 11:46:15 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:36364 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105Ab2J1PqP (ORCPT ); Sun, 28 Oct 2012 11:46:15 -0400 Received: by mail-lb0-f174.google.com with SMTP id n3so2548797lbo.19 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 Cc: Vasily Khoruzhick 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 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.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;