linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: "Pavel Machek" <pavel@ucw.cz>,
	"David Lanzendörfer" <david.lanzendoerfer@o2s.ch>,
	"Daniel Walker" <dwalker@codeaurora.org>
Subject: [PATCH 2/5] msm: gpio support for trout.
Date: Tue, 13 Jul 2010 13:03:08 -0700	[thread overview]
Message-ID: <1279051391-16564-2-git-send-email-dwalker@codeaurora.org> (raw)
In-Reply-To: <1279051391-16564-1-git-send-email-dwalker@codeaurora.org>

This adds the tables required to enable gpiolib support in trout.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
 arch/arm/mach-msm/board-trout.c     |   21 +++++++++++++++++++--
 arch/arm/mach-msm/devices-msm7x00.c |   18 ++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 8f1b28f..bc0afa4 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -32,7 +32,23 @@
 
 extern int trout_init_mmc(unsigned int);
 
-static struct platform_device *devices[] __initdata = {
+/*
+ * Early devices are those which provide a system service which will be
+ * required by one or more of the function calls in msm7x30_init.
+ * These devices must be probed and online first in order for
+ * the init routine to run successfully.
+ */
+static struct platform_device *early_devices[] __initdata = {
+	&msm_gpio_devices[0],
+	&msm_gpio_devices[1],
+	&msm_gpio_devices[2],
+	&msm_gpio_devices[3],
+	&msm_gpio_devices[4],
+	&msm_gpio_devices[5],
+};
+
+
+static struct platform_device *late_devices[] __initdata = {
 	&msm_device_uart3,
 	&msm_device_smd,
 	&msm_device_nand,
@@ -60,7 +76,8 @@ static void __init trout_init(void)
 {
 	int rc;
 
-	platform_add_devices(devices, ARRAY_SIZE(devices));
+	platform_add_devices(early_devices, ARRAY_SIZE(early_devices));
+	platform_add_devices(late_devices, ARRAY_SIZE(late_devices));
 
 #ifdef CONFIG_MMC
         rc = trout_init_mmc(system_rev);
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c
index c782f72..a084d14 100644
--- a/arch/arm/mach-msm/devices-msm7x00.c
+++ b/arch/arm/mach-msm/devices-msm7x00.c
@@ -413,6 +413,24 @@ struct platform_device msm_device_mdp = {
 	.resource = resources_mdp,
 };
 
+static struct msm7200a_gpio_platform_data gpio_platform_data[] = {
+	MSM7200A_GPIO_PLATFORM_DATA(0,   0,  15, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(1,  16,  42, INT_GPIO_GROUP2),
+	MSM7200A_GPIO_PLATFORM_DATA(2,  43,  67, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(3,  68,  94, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(4,  95, 106, INT_GPIO_GROUP1),
+	MSM7200A_GPIO_PLATFORM_DATA(5, 107, 121, INT_GPIO_GROUP1),
+};
+
+struct platform_device msm_gpio_devices[] = {
+	MSM7200A_GPIO_DEVICE(0, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(1, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(2, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(3, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(4, gpio_platform_data),
+	MSM7200A_GPIO_DEVICE(5, gpio_platform_data),
+};
+
 struct clk msm_clocks_7x01a[] = {
 	CLK_PCOM("adm_clk",	ADM_CLK,	NULL, 0),
 	CLK_PCOM("adsp_clk",	ADSP_CLK,	NULL, 0),
-- 
1.7.0.4

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 20:03 [PATCH 1/5] msm: fb: initial framebuffer support Daniel Walker
2010-07-13 20:03 ` Daniel Walker [this message]
2010-07-13 20:03 ` [PATCH 3/5] video: msm: change to min/max clock calls Daniel Walker
2010-07-13 20:03 ` [PATCH 4/5] msm: fix up mddi clock Daniel Walker
2010-07-13 20:03 ` [PATCH 5/5] [ARM] msm: mdp: fix for 2.6.32 Daniel Walker
2010-07-13 20:05 ` [PATCH 1/5] msm: fb: initial framebuffer support Daniel Walker

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=1279051391-16564-2-git-send-email-dwalker@codeaurora.org \
    --to=dwalker@codeaurora.org \
    --cc=david.lanzendoerfer@o2s.ch \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).