From: Kuninori Morimoto <morimoto.kuninori@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] ARM: mach-shmobile: ap4evb: Add KEYSC support
Date: Tue, 23 Feb 2010 07:07:01 +0000 [thread overview]
Message-ID: <umxz09yzk.wl%morimoto.kuninori@renesas.com> (raw)
In-Reply-To: <uhbpex68f.wl%morimoto.kuninori@renesas.com>
Because AP4 board has capacitor for KEYSC,
we need much time for waiting.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
---
arch/arm/mach-shmobile/board-ap4evb.c | 61 +++++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 41bc248..39cfd59 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -29,6 +29,8 @@
#include <linux/io.h>
#include <linux/smsc911x.h>
#include <linux/gpio.h>
+#include <linux/input.h>
+#include <linux/input/sh_keysc.h>
#include <mach/common.h>
#include <mach/sh7372.h>
#include <asm/mach-types.h>
@@ -77,6 +79,15 @@
* OFF access enable
*/
+/*
+ * KEYSC
+ *
+ * SW43 KEYSC
+ * -------------------------
+ * ON enable
+ * OFF disable
+ */
+
/* MTD */
static struct mtd_partition nor_flash_partitions[] = {
{
@@ -158,9 +169,47 @@ static struct platform_device smc911x_device = {
},
};
+/* KEYSC (Needs SW43 set to ON) */
+static struct sh_keysc_info keysc_info = {
+ .mode = SH_KEYSC_MODE_1,
+ .scan_timing = 3,
+ .delay = 2500,
+ .keycodes = {
+ KEY_0, KEY_1, KEY_2, KEY_3, KEY_4,
+ KEY_5, KEY_6, KEY_7, KEY_8, KEY_9,
+ KEY_A, KEY_B, KEY_C, KEY_D, KEY_E,
+ KEY_F, KEY_G, KEY_H, KEY_I, KEY_J,
+ KEY_K, KEY_L, KEY_M, KEY_N, KEY_O,
+ },
+};
+
+static struct resource keysc_resources[] = {
+ [0] = {
+ .name = "KEYSC",
+ .start = 0xe61b0000,
+ .end = 0xe61b0063,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 79,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device keysc_device = {
+ .name = "sh_keysc",
+ .id = 0, /* "keysc0" clock */
+ .num_resources = ARRAY_SIZE(keysc_resources),
+ .resource = keysc_resources,
+ .dev = {
+ .platform_data = &keysc_info,
+ },
+};
+
static struct platform_device *ap4evb_devices[] __initdata = {
&nor_flash_device,
&smc911x_device,
+ &keysc_device,
};
static struct map_desc ap4evb_io_desc[] __initdata = {
@@ -197,6 +246,18 @@ static void __init ap4evb_init(void)
gpio_request(GPIO_FN_CS5A, NULL);
gpio_request(GPIO_FN_IRQ6_39, NULL);
+ /* enable KEYSC */
+ gpio_request(GPIO_FN_KEYOUT0, NULL);
+ gpio_request(GPIO_FN_KEYOUT1, NULL);
+ gpio_request(GPIO_FN_KEYOUT2, NULL);
+ gpio_request(GPIO_FN_KEYOUT3, NULL);
+ gpio_request(GPIO_FN_KEYOUT4, NULL);
+ gpio_request(GPIO_FN_KEYIN0_136, NULL);
+ gpio_request(GPIO_FN_KEYIN1_135, NULL);
+ gpio_request(GPIO_FN_KEYIN2_134, NULL);
+ gpio_request(GPIO_FN_KEYIN3_133, NULL);
+ gpio_request(GPIO_FN_KEYIN4, NULL);
+
sh7372_add_standard_devices();
platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
--
1.6.3.3
next prev parent reply other threads:[~2010-02-23 7:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 7:44 [PATCH] ARM: mach-shmobile: ap4evb: Add SCIFA0 support Kuninori Morimoto
2010-02-18 8:58 ` [PATCH] ARM: mach-shmobile: ap4evb: Add tiny document Kuninori Morimoto
2010-02-18 9:32 ` [PATCH] ARM: mach-shmobile: ap4evb: Add SCIFA0 support Paul Mundt
2010-02-23 7:07 ` Kuninori Morimoto [this message]
2010-02-23 7:53 ` [PATCH] ARM: mach-shmobile: ap4evb: Add KEYSC support Kuninori Morimoto
2010-02-25 7:55 ` Paul Mundt
2010-03-12 10:07 ` [PATCH] ARM: mach-shmobile: ap4evb: Add SW43, SW3 tiny document Kuninori Morimoto
2010-05-13 1:08 ` [PATCH] ARM: mach-shmobile: ap4evb: Add FSI2 support Kuninori Morimoto
2010-05-13 1:08 ` [PATCH] ARM: mach-shmobile: ap4evb: Add MMC support Kuninori Morimoto
2010-05-20 3:16 ` [PATCH] ARM: mach-shmobile: ap4evb: Add FSI2 support Paul Mundt
2010-05-31 4:49 ` [PATCH] ARM: mach-shmobile: ap4evb: Add MMC support Paul Mundt
2010-06-04 3:15 ` [PATCH] ARM: mach-shmobile: ap4evb: Add LCD panel selection Kuninori Morimoto
2010-06-04 5:20 ` Paul Mundt
2010-07-14 7:01 ` [PATCH] ARM: mach-shmobile: ap4evb: Add ts_get_pendown_state for Kuninori Morimoto
2010-07-14 7:01 ` Kuninori Morimoto
2010-10-18 10:13 ` [PATCH] ARM: mach-shmobile: ap4evb: Add HDMI sound support Kuninori Morimoto
2010-10-31 14:54 ` Paul Mundt
2010-11-15 3:11 ` [PATCH] ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate Kuninori Morimoto
2010-11-15 5:43 ` Paul Mundt
2010-11-16 4:12 ` [PATCH] ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate fixup Kuninori Morimoto
2010-11-16 4:30 ` Paul Mundt
2010-11-16 6:22 ` Kuninori Morimoto
2010-11-16 6:24 ` Paul Mundt
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=umxz09yzk.wl%morimoto.kuninori@renesas.com \
--to=morimoto.kuninori@renesas.com \
--cc=linux-sh@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.