linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dima Zavin <dmitriyz@google.com>
To: Gregory Bean <gbean@codeaurora.org>
Cc: dwalker@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5 v4] msm: convert 7x30 to gpiomux.
Date: Sun, 9 Jan 2011 14:53:01 -0800	[thread overview]
Message-ID: <AANLkTikrLnGxNSJgv3KDNAQ5kvjNd8aPrOEBwftiiyrQ@mail.gmail.com> (raw)
In-Reply-To: <1283015148-10747-4-git-send-email-gbean@codeaurora.org>

Greg,

Just rebased on top of 2.6.37 and this patch is totally the wrong way
to go about this.

I should have commented at the appropriate time, so sorry for the late reply.

Having this  msm_gpiomux_configs be always compiled in for all msm7x30
devices makes this entire system completely inflexible since you have
to modify common code to provide board specific initialization. The
definition of "msm_gpiomux_configs" belongs in the board file, not in
gpiomux-7x30.c. I think we need to delete this new file and move the
definition back into board-msm7x30.c, but just use the new gpiomux
APIs.

I can provide a patch if you like.

--Dima

On Sat, Aug 28, 2010 at 10:05 AM, Gregory Bean <gbean@codeaurora.org> wrote:
> Change deprecated gpio_tlmm_config calls to gpiomux calls.
>
> Signed-off-by: Gregory Bean <gbean@codeaurora.org>
> ---
>  arch/arm/mach-msm/board-msm7x30.c |   20 --------------------
>  arch/arm/mach-msm/gpiomux-7x30.c  |   21 ++++++++++++++++++++-
>  2 files changed, 20 insertions(+), 21 deletions(-)
>
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index e329819..74abb74 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -39,22 +39,6 @@
>
>  extern struct sys_timer msm_timer;
>
> -#ifdef CONFIG_SERIAL_MSM_CONSOLE
> -static struct msm_gpio uart2_config_data[] = {
> -       { GPIO_CFG(49, 2, GPIO_OUTPUT,  GPIO_PULL_DOWN, GPIO_2MA), "UART2_RFR"},
> -       { GPIO_CFG(50, 2, GPIO_INPUT,   GPIO_PULL_DOWN, GPIO_2MA), "UART2_CTS"},
> -       { GPIO_CFG(51, 2, GPIO_INPUT,   GPIO_PULL_DOWN, GPIO_2MA), "UART2_Rx"},
> -       { GPIO_CFG(52, 2, GPIO_OUTPUT,  GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"},
> -};
> -
> -static void msm7x30_init_uart2(void)
> -{
> -       msm_gpios_request_enable(uart2_config_data,
> -                       ARRAY_SIZE(uart2_config_data));
> -
> -}
> -#endif
> -
>  static struct platform_device *devices[] __initdata = {
>  #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
>         &msm_device_uart2,
> @@ -70,10 +54,6 @@ static void __init msm7x30_init_irq(void)
>  static void __init msm7x30_init(void)
>  {
>        platform_add_devices(devices, ARRAY_SIZE(devices));
> -#ifdef CONFIG_SERIAL_MSM_CONSOLE
> -       msm7x30_init_uart2();
> -#endif
> -
>  }
>
>  static void __init msm7x30_map_io(void)
> diff --git a/arch/arm/mach-msm/gpiomux-7x30.c b/arch/arm/mach-msm/gpiomux-7x30.c
> index 7b380b3..6ce41c5 100644
> --- a/arch/arm/mach-msm/gpiomux-7x30.c
> +++ b/arch/arm/mach-msm/gpiomux-7x30.c
> @@ -16,4 +16,23 @@
>  */
>  #include "gpiomux.h"
>
> -struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {};
> +struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
> +#ifdef CONFIG_SERIAL_MSM_CONSOLE
> +       [49] = { /* UART2 RFR */
> +               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
> +                            GPIOMUX_FUNC_2 | GPIOMUX_VALID,
> +       },
> +       [50] = { /* UART2 CTS */
> +               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
> +                            GPIOMUX_FUNC_2 | GPIOMUX_VALID,
> +       },
> +       [51] = { /* UART2 RX */
> +               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
> +                            GPIOMUX_FUNC_2 | GPIOMUX_VALID,
> +       },
> +       [52] = { /* UART2 TX */
> +               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
> +                            GPIOMUX_FUNC_2 | GPIOMUX_VALID,
> +       },
> +#endif
> +};
> --
> 1.7.0.4
>
> /usr2/gbean/.signature.codeaurora.org
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-01-09 22:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-28 17:05 [PATCH 1/5 v4] msm: add gpiomux api for gpio multiplex & configuration Gregory Bean
2010-08-28 17:05 ` [PATCH 2/5 v4] msm: documentation: add gpiomux documentation Gregory Bean
2010-08-28 17:05 ` [PATCH 3/5 v4] msm: convert 8x50 to gpiomux Gregory Bean
2010-08-28 17:05 ` [PATCH 4/5 v4] msm: convert 7x30 " Gregory Bean
2011-01-09 22:53   ` Dima Zavin [this message]
2011-01-10 17:33     ` Daniel Walker
2011-01-10 19:00       ` [PATCH] ARM: msm: 7x30: don't force a gpiomux table for the whole arch Dima Zavin
2011-01-14  3:35         ` Rohit Vaswani
2011-01-14 21:08           ` Daniel Walker
2011-01-14 18:16         ` David Brown
2011-01-14 19:17           ` Dima Zavin
2011-01-10 22:43       ` [PATCH 4/5 v4] msm: convert 7x30 to gpiomux Dima Zavin
2010-08-28 17:05 ` [PATCH 5/5 v4] msm: gpio: Remove tlmm routines obsoleted by gpiomux Gregory Bean

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=AANLkTikrLnGxNSJgv3KDNAQ5kvjNd8aPrOEBwftiiyrQ@mail.gmail.com \
    --to=dmitriyz@google.com \
    --cc=dwalker@codeaurora.org \
    --cc=gbean@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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).