msm_serial_hs: Cleanup code to configure/unconfigure UART GPIOs
With current approach UART GPIOs are configure/unconfigure from
board files by using GPIOLib APIs. UART driver uses gpio_config
pdata based function pointer to call per uart device related API
from board file for the same. Hence correct this approach and
pass only UART GPIOs numbers to UART driver using pdata and
configure/unconfigure those GPIOs using GPIOLib APIs once UART
port is being opened and closed respectively.
CRs-Fixed: 460961
Change-Id: I4bb007b2b476525cb50dd2eb5788c735aae0e32d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 7c502d9..f2f41cf 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -3600,30 +3600,14 @@
};
#ifdef CONFIG_SERIAL_MSM_HS
-static int configure_uart_gpios(int on)
-{
- int ret = 0, i;
- int uart_gpios[] = {53, 54, 55, 56};
- for (i = 0; i < ARRAY_SIZE(uart_gpios); i++) {
- if (on) {
- ret = msm_gpiomux_get(uart_gpios[i]);
- if (unlikely(ret))
- break;
- } else {
- ret = msm_gpiomux_put(uart_gpios[i]);
- if (unlikely(ret))
- return ret;
- }
- }
- if (ret)
- for (; i >= 0; i--)
- msm_gpiomux_put(uart_gpios[i]);
- return ret;
-}
static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
- .inject_rx_on_wakeup = 1,
- .rx_to_inject = 0xFD,
- .gpio_config = configure_uart_gpios,
+ .inject_rx_on_wakeup = 1,
+ .rx_to_inject = 0xFD,
+ .config_gpio = 4,
+ .uart_tx_gpio = 53,
+ .uart_rx_gpio = 54,
+ .uart_cts_gpio = 55,
+ .uart_rfr_gpio = 56,
};
#endif