All of lore.kernel.org
 help / color / mirror / Atom feed
From: jason77.wang@gmail.com (Jason Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] mx51: add imx_keypad device definition for mx51 platforms
Date: Tue, 13 Jul 2010 21:02:40 +0800	[thread overview]
Message-ID: <1279026162-6634-3-git-send-email-jason77.wang@gmail.com> (raw)
In-Reply-To: <1279026162-6634-2-git-send-email-jason77.wang@gmail.com>

add imx_keypad platform device definition and clocks for mx51
platforms.

Signed-off-by: Jason Wang <jason77.wang@gmail.com>
---
 arch/arm/mach-mx5/clock-mx51.c |    5 +++++
 arch/arm/mach-mx5/devices.c    |   19 +++++++++++++++++++
 arch/arm/mach-mx5/devices.h    |    1 +
 3 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c
index fd24092..6af69de 100644
--- a/arch/arm/mach-mx5/clock-mx51.c
+++ b/arch/arm/mach-mx5/clock-mx51.c
@@ -758,6 +758,10 @@ static struct clk gpt_32k_clk = {
 	.parent = &ckil_clk,
 };
 
+static struct clk kpp_clk = {
+	.id = 0,
+};
+
 #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s)	\
 	static struct clk name = {			\
 		.id		= i,			\
@@ -832,6 +836,7 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", ahb_clk)
 	_REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk)
 	_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk)
+	_REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk)
 };
 
 static void clk_tree_init(void)
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
index fa11864..aafa61c 100644
--- a/arch/arm/mach-mx5/devices.c
+++ b/arch/arm/mach-mx5/devices.c
@@ -226,6 +226,25 @@ struct platform_device mxc_wdt = {
 	.resource = mxc_wdt_resources,
 };
 
+static struct resource mxc_kpp_resources[] = {
+	{
+		.start = MX51_MXC_INT_KPP,
+		.end = MX51_MXC_INT_KPP,
+		.flags = IORESOURCE_IRQ,
+	} , {
+		.start = MX51_KPP_BASE_ADDR,
+		.end = MX51_KPP_BASE_ADDR + 0x8 - 1,
+		.flags = IORESOURCE_MEM,
+	},
+};
+
+struct platform_device mxc_keypad_device = {
+	.name = "imx-keypad",
+	.id = 0,
+	.num_resources = ARRAY_SIZE(mxc_kpp_resources),
+	.resource = mxc_kpp_resources,
+};
+
 static struct mxc_gpio_port mxc_gpio_ports[] = {
 	{
 		.chip.label = "gpio-0",
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h
index a853933..e509cfa 100644
--- a/arch/arm/mach-mx5/devices.h
+++ b/arch/arm/mach-mx5/devices.h
@@ -9,3 +9,4 @@ extern struct platform_device mxc_wdt;
 extern struct platform_device mxc_i2c_device0;
 extern struct platform_device mxc_i2c_device1;
 extern struct platform_device mxc_hsi2c_device;
+extern struct platform_device mxc_keypad_device;
-- 
1.5.6.5

  reply	other threads:[~2010-07-13 13:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 13:02 [PATCH 0/3]Add imx51_3ds platform support Jason Wang
2010-07-13 13:02 ` [PATCH 1/3] mx51_3ds: Add support for the imx51 3-stack board Jason Wang
2010-07-13 13:02   ` Jason Wang [this message]
2010-07-13 13:02     ` [PATCH 3/3] mx51_3ds: add keypad support on 3ds platform Jason Wang
2010-07-13 13:02       ` [PATCH] imx: move gpio init after to irq init Jason Wang
2010-07-13 14:24         ` Amit Kucheria
2010-07-23 14:02         ` Eric Bénard
2010-07-14  6:56   ` [PATCH 1/3] mx51_3ds: Add support for the imx51 3-stack board Sascha Hauer
2010-07-14 13:33   ` Uwe Kleine-König
2010-07-13 14:39 ` [PATCH 0/3]Add imx51_3ds platform support Amit Kucheria
2010-07-14  6:58 ` Sascha Hauer

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=1279026162-6634-3-git-send-email-jason77.wang@gmail.com \
    --to=jason77.wang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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.