msm: convert 8x50 to gpiomux.
authorGregory Bean <gbean@codeaurora.org>
Sat, 28 Aug 2010 17:05:46 +0000 (10:05 -0700)
committerDaniel Walker <dwalker@codeaurora.org>
Wed, 6 Oct 2010 16:01:16 +0000 (09:01 -0700)
Change the gpio-init code from deprecated gpio_tlmm_config
to the new gpiomux api.

Signed-off-by: Gregory Bean <gbean@codeaurora.org>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-msm/gpiomux-8x50.c

index e3cc80792d6c2bafbcb9bb68ce9505434d71c176..fb0fe6771e560923d9edda37ee7dc0ac5e6acf92 100644 (file)
 
 extern struct sys_timer msm_timer;
 
-static struct msm_gpio uart3_config_data[] = {
-       { GPIO_CFG(86, 1, GPIO_INPUT,   GPIO_PULL_DOWN, GPIO_2MA), "UART2_Rx"},
-       { GPIO_CFG(87, 1, GPIO_OUTPUT,  GPIO_PULL_DOWN, GPIO_2MA), "UART2_Tx"},
-};
-
 static struct platform_device *devices[] __initdata = {
        &msm_device_uart3,
 };
 
-static void msm8x50_init_uart3(void)
-{
-       msm_gpios_request_enable(uart3_config_data,
-                               ARRAY_SIZE(uart3_config_data));
-}
-
 static void __init qsd8x50_map_io(void)
 {
        msm_map_qsd8x50_io();
@@ -64,7 +53,6 @@ static void __init qsd8x50_init_irq(void)
 
 static void __init qsd8x50_init(void)
 {
-       msm8x50_init_uart3();
        platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
index 7b380b31bd0e26cfd44879cca656466b556b38b3..4406e0f4ae9508670d5303c494b5952a808c71be 100644 (file)
  */
 #include "gpiomux.h"
 
-struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {};
+struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
+       [86] = { /* UART3 RX */
+               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
+                            GPIOMUX_FUNC_1 | GPIOMUX_VALID,
+       },
+       [87] = { /* UART3 TX */
+               .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
+                            GPIOMUX_FUNC_1 | GPIOMUX_VALID,
+       },
+};