From patchwork Thu Sep 30 05:29:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abraham Arce X-Patchwork-Id: 218752 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8U5UIs5024281 for ; Thu, 30 Sep 2010 05:30:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927Ab0I3FaS (ORCPT ); Thu, 30 Sep 2010 01:30:18 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:54811 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137Ab0I3FaQ (ORCPT ); Thu, 30 Sep 2010 01:30:16 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8U5UGFf003997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Sep 2010 00:30:16 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o8U5UFxW005507; Thu, 30 Sep 2010 00:30:15 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8U5UFpD000595; Thu, 30 Sep 2010 00:30:15 -0500 (CDT) Received: from localhost.localdomain (128.247.79.52) by dlee73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server (TLS) id 8.1.358.0; Thu, 30 Sep 2010 00:30:15 -0500 From: Abraham Arce To: , CC: Abraham Arce Subject: [PATCH v6 3/8] Input: omap4 - SYSCONFIG register configuration Date: Thu, 30 Sep 2010 00:29:20 -0500 Message-ID: <1285824565-24906-4-git-send-email-x0066660@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1285824565-24906-1-git-send-email-x0066660@ti.com> References: <1285824565-24906-1-git-send-email-x0066660@ti.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 05:30:18 +0000 (UTC) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 788169d..2b61f5f 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -51,17 +51,15 @@ #define OMAP4_KBD_FULLCODE63_32 0x48 /* OMAP4 bit definitions */ -#define OMAP4_DEF_SYSCONFIG_SOFTRST (1 << 1) -#define OMAP4_DEF_SYSCONFIG_ENAWKUP (1 << 2) #define OMAP4_DEF_IRQENABLE_EVENTEN (1 << 0) #define OMAP4_DEF_IRQENABLE_LONGKEY (1 << 1) #define OMAP4_DEF_IRQENABLE_TIMEOUTEN (1 << 2) #define OMAP4_DEF_CTRL_NOSOFTMODE (1 << 1) #define OMAP4_DEF_CTRLPTVVALUE (1 << 2) #define OMAP4_DEF_CTRLPTV (1 << 1) -#define OMAP4_DEF_IRQDISABLE 0x00 /* OMAP4 values */ +#define OMAP4_VAL_IRQDISABLE 0x00 #define OMAP4_VAL_DEBOUNCINGTIME 0x07 #define OMAP4_VAL_FUNCTIONALCFG 0x1E @@ -82,13 +80,11 @@ struct omap4_keypad { static void __devinit omap4_keypad_config(struct omap4_keypad *keypad_data) { - __raw_writel(OMAP4_DEF_SYSCONFIG_SOFTRST | OMAP4_DEF_SYSCONFIG_ENAWKUP, - keypad_data->base + OMAP4_KBD_SYSCONFIG); __raw_writel(OMAP4_VAL_FUNCTIONALCFG, keypad_data->base + OMAP4_KBD_CTRL); __raw_writel(OMAP4_VAL_DEBOUNCINGTIME, keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME); - __raw_writel(OMAP4_DEF_IRQDISABLE, + __raw_writel(OMAP4_VAL_IRQDISABLE, keypad_data->base + OMAP4_KBD_IRQSTATUS); __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY, keypad_data->base + OMAP4_KBD_IRQENABLE); @@ -104,11 +100,12 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id) u32 *new_state = (u32 *) key_state; /* Disable interrupts */ - __raw_writel(OMAP4_DEF_IRQDISABLE, + __raw_writel(OMAP4_VAL_IRQDISABLE, keypad_data->base + OMAP4_KBD_IRQENABLE); *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0); - *(new_state + 1) = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE63_32); + *(new_state + 1) = __raw_readl(keypad_data->base + + OMAP4_KBD_FULLCODE63_32); for (row = 0; row < keypad_data->rows; row++) { changed = key_state[row] ^ keypad_data->key_state[row];