linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@codeaurora.org>
To: Gregory Bean <gbean@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] msm: 8x50: add gpio device configuration.
Date: Fri, 18 Jun 2010 14:59:44 -0700	[thread overview]
Message-ID: <1276898384.30433.75.camel@c-dwalke-linux.qualcomm.com> (raw)
In-Reply-To: <1276888375-13221-4-git-send-email-gbean@codeaurora.org>

On Fri, 2010-06-18 at 12:12 -0700, Gregory Bean wrote:
> Add device configuration and board-init for gpio support on the QSD8x50.
> 
> Signed-off-by: Gregory Bean <gbean@codeaurora.org>
> ---
>  arch/arm/mach-msm/board-qsd8x50.c   |   29 +++++++++++++++++++++++++++--
>  arch/arm/mach-msm/devices-qsd8x50.c |   23 +++++++++++++++++++++++
>  2 files changed, 50 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
> index e3cc807..9137002 100644
> --- a/arch/arm/mach-msm/board-qsd8x50.c
> +++ b/arch/arm/mach-msm/board-qsd8x50.c
> @@ -40,7 +40,31 @@ static struct msm_gpio uart3_config_data[] = {
>  	{ GPIO_CFG(87, 1, GPIO_OUTPUT,  GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"},
>  };
>  
> -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 qsd8x50_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 = {
> +#ifdef CONFIG_GPIOLIB

We can drop the ifdefs I think , cause there's no off state anymore.


> +	&msm_gpio_devices[0],
> +	&msm_gpio_devices[1],
> +	&msm_gpio_devices[2],
> +	&msm_gpio_devices[3],
> +	&msm_gpio_devices[4],
> +	&msm_gpio_devices[5],
> +	&msm_gpio_devices[6],
> +	&msm_gpio_devices[7],
> +#endif
> +};
> +
> +/*
> + * Late devices are those which are dependent upon services initialized
> + * by qsd8x50_init, or which simply have no dependents and can have
> + * their initialization deferred.
> + */
> +static struct platform_device *late_devices[] __initdata = {
>  	&msm_device_uart3,
>  };
>  
> @@ -64,8 +88,9 @@ static void __init qsd8x50_init_irq(void)
>  
>  static void __init qsd8x50_init(void)
>  {
> +	platform_add_devices(early_devices, ARRAY_SIZE(early_devices));
>  	msm8x50_init_uart3();
> -	platform_add_devices(devices, ARRAY_SIZE(devices));
> +	platform_add_devices(late_devices, ARRAY_SIZE(late_devices));
>  }
>  
>  MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
> diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c
> index 4d4a507..b9f692e 100644
> --- a/arch/arm/mach-msm/devices-qsd8x50.c
> +++ b/arch/arm/mach-msm/devices-qsd8x50.c
> @@ -90,3 +90,26 @@ struct clk msm_clocks_8x50[] = {
>  
>  unsigned msm_num_clocks_8x50 = ARRAY_SIZE(msm_clocks_8x50);
>  
> +#ifdef CONFIG_GPIOLIB

Any this one.

> +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, 103, INT_GPIO_GROUP1),
> +	MSM7200A_GPIO_PLATFORM_DATA(5, 104, 121, INT_GPIO_GROUP1),
> +	MSM7200A_GPIO_PLATFORM_DATA(6, 122, 152, INT_GPIO_GROUP1),
> +	MSM7200A_GPIO_PLATFORM_DATA(7, 153, 164, 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),
> +	MSM7200A_GPIO_DEVICE(6, gpio_platform_data),
> +	MSM7200A_GPIO_DEVICE(7, gpio_platform_data),
> +};
> +#endif

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


  reply	other threads:[~2010-06-18 21:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 19:12 [PATCH 0/3] msm: Add gpiolib devices to MSM7x30 and QSD8x50 Gregory Bean
2010-06-18 19:12 ` [PATCH 1/3] msm: Add gpio register address mapping information Gregory Bean
2010-06-19 20:02   ` Pavel Machek
2010-06-21 17:03     ` Bryan Huntsman
2010-06-21 17:18       ` Alan Cox
2010-06-21 17:28         ` Bryan Huntsman
2010-06-21 19:08           ` Alan Cox
2010-06-21 17:51         ` Daniel Walker
2010-06-21 17:27       ` Pavel Machek
2010-06-18 19:12 ` [PATCH 2/3] msm: 7x30: Add gpio device configuration Gregory Bean
2010-06-18 19:12 ` [PATCH 3/3] msm: 8x50: add " Gregory Bean
2010-06-18 21:59   ` Daniel Walker [this message]
2010-06-18 19:26 ` [PATCH 0/3] msm: Add gpiolib devices to MSM7x30 and QSD8x50 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=1276898384.30433.75.camel@c-dwalke-linux.qualcomm.com \
    --to=dwalker@codeaurora.org \
    --cc=gbean@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@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 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).