From: Phil Sutter <n0-1@freewrt.org>
To: Dmitry Torokhov <dtor@mail.ru>
Cc: linux-input@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, Florian Fainelli <florian@openwrt.org>
Subject: [PATCH 1/2] MIPS: rb532: prepare board support for rb532-button
Date: Thu, 22 Jan 2009 20:12:07 +0100 [thread overview]
Message-ID: <20090122191219.4B109400E123@mail.nwl.cc> (raw)
In-Reply-To: <1232651528-19870-1-git-send-email-n0-1@freewrt.org>
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
+/* 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 = {
.id = -1,
};
-static struct gpio_keys_button rb532_gpio_btn[] = {
- {
- .gpio = 1,
- .code = BTN_0,
- .desc = "S1",
- .active_low = 1,
- }
-};
-
-static struct gpio_keys_platform_data rb532_gpio_btn_data = {
- .buttons = rb532_gpio_btn,
- .nbuttons = ARRAY_SIZE(rb532_gpio_btn),
-};
-
static struct platform_device rb532_button = {
- .name = "gpio-keys",
+ .name = "rb532-button",
.id = -1,
- .dev = {
- .platform_data = &rb532_gpio_btn_data,
- }
};
static struct resource rb532_wdt_res[] = {
--
1.5.6.4
next parent reply other threads:[~2009-01-22 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1232651528-19870-1-git-send-email-n0-1@freewrt.org>
2009-01-22 19:12 ` Phil Sutter [this message]
[not found] ` <1232651528-19870-2-git-send-email-n0-1@freewrt.org>
2009-01-22 19:12 ` [PATCH 2/2] input: add driver for S1 button of rb532 Phil Sutter
2009-01-24 8:34 ` Geert Uytterhoeven
2009-01-24 14:20 ` Phil Sutter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090122191219.4B109400E123@mail.nwl.cc \
--to=n0-1@freewrt.org \
--cc=dtor@mail.ru \
--cc=florian@openwrt.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).