Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Thu, 22 Jan 2009
 11:13:12 -0800
Received: from chiesmta2-1.messageone.com ([216.203.30.55]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Thu, 22 Jan 2009 11:13:10 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 chiesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id n0MJDCRW016207	for
 <andy.sharp@onstor.com>; Thu, 22 Jan 2009 13:13:13 -0600
Received: from localhost.localdomain ([127.0.0.1]:19436 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S21103563AbZAVTNB
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Thu, 22 Jan 2009 19:13:01 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Jan 2009 19:12:44
 +0000 (GMT)
Received: from orbit.nwl.cc ([91.121.169.95]:14508 "EHLO mail.nwl.cc")	by
 ftp.linux-mips.org with ESMTP id S21103572AbZAVTMZ (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 22 Jan 2009 19:12:25 +0000
Received: from base (localhost [127.0.0.1])	by mail.nwl.cc (Postfix) with
 ESMTP id 4B109400E123;	Thu, 22 Jan 2009 20:12:19 +0100 (CET)
From: Phil Sutter <n0-1@freewrt.org>
To: Dmitry Torokhov <dtor@mail.ru>
CC: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>, Ralf Baechle
	<ralf@linux-mips.org>, "linux-mips@linux-mips.org"
	<linux-mips@linux-mips.org>, Florian Fainelli <florian@openwrt.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Thu, 22 Jan 2009 11:12:07 -0800
Subject: [PATCH 1/2] MIPS: rb532: prepare board support for rb532-button
Thread-Topic: [PATCH 1/2] MIPS: rb532: prepare board support for rb532-button
Thread-Index: Acl8xXhqfpXrMhQGR/GJ26Qsmt1kKg==
Message-ID: <20090122191219.4B109400E123@mail.nwl.cc>
References: <1232651528-19870-1-git-send-email-n0-1@freewrt.org>
In-Reply-To: <1232651528-19870-1-git-send-email-n0-1@freewrt.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 22 Jan 2009 19:13:10.0920 (UTC)
 FILETIME=[77548880:01C97CC5]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: Jb64DJIkXZ+PcAPlgwsBFw==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2009-01-22_13:2009-01-21,2009-01-22,2009-01-22 signatures=0
x-messageone-virus-scanned: Clean
x-messageone-envelope-sender: linux-mips-bounce@linux-mips.org
x-messageone-spam-details: rule=m773emszm_notspam policy=m773emszm score=0
 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
 adjust=0 reason=mlx engine=3.1.0-0810130000 definitions=main-0901220137
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21800
x-ecartis-version: Ecartis v1.0.0
x-original-sender: n0-1@freewrt.org
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Add a macro containing the S1 button GPIO pin index, as done for NAND
and CompactFlash GPIO pins. Also remove gpio-keys specific device code
and rename the button device to mach it's driver.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
---
 arch/mips/include/asm/mach-rc32434/gpio.h |    3 +++
 arch/mips/rb532/devices.c                 |   19 +------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/=
asm/mach-rc32434/gpio.h
index 3cb50d1..12ee8d5 100644
--- a/arch/mips/include/asm/mach-rc32434/gpio.h
+++ b/arch/mips/include/asm/mach-rc32434/gpio.h
@@ -80,6 +80,9 @@ struct rb532_gpio_reg {
 /* Compact Flash GPIO pin */
 #define CF_GPIO_NUM		13
=20
+/* S1 button GPIO (shared with UART0_SIN) */
+#define GPIO_BTN_S1		1
+
 extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
 extern void rb532_gpio_set_istat(int bit, unsigned gpio);
 extern void rb532_gpio_set_func(unsigned gpio);
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index 4a5f05b..7b585de 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -200,26 +200,9 @@ static struct platform_device rb532_led =3D {
 	.id =3D -1,
 };
=20
-static struct gpio_keys_button rb532_gpio_btn[] =3D {
-	{
-		.gpio =3D 1,
-		.code =3D BTN_0,
-		.desc =3D "S1",
-		.active_low =3D 1,
-	}
-};
-
-static struct gpio_keys_platform_data rb532_gpio_btn_data =3D {
-	.buttons =3D rb532_gpio_btn,
-	.nbuttons =3D ARRAY_SIZE(rb532_gpio_btn),
-};
-
 static struct platform_device rb532_button =3D {
-	.name 	=3D "gpio-keys",
+	.name 	=3D "rb532-button",
 	.id	=3D -1,
-	.dev	=3D {
-		.platform_data =3D &rb532_gpio_btn_data,
-	}
 };
=20
 static struct resource rb532_wdt_res[] =3D {
--=20
1.5.6.4


