aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2012-03-05 14:08:35 -0500
committerTony Lindgren <tony@atomide.com>2012-03-05 14:08:35 -0500
commitd4860ebef4f7e45ebc37013d5008de85cc24a94e (patch)
tree90f49e31be158f7f5fd30fbac3731e941e9ab204 /arch/arm
parentafbb1893ef49cc465d9b2b724c1f1838999f8dba (diff)
ARM: OMAP3: RX-51: add explicit mux configuration of tsc2005 control gpios
This change converts TSC2005 related GPIO requests to be done with gpio_request_array() method and explicitly inits mux configuration for these GPIOs. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index acb4e77b39ef..33c1f8c50353 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -1105,6 +1105,11 @@ static struct tsc2005_platform_data tsc2005_pdata = {
1105 .esd_timeout_ms = 8000, 1105 .esd_timeout_ms = 8000,
1106}; 1106};
1107 1107
1108static struct gpio rx51_tsc2005_gpios[] __initdata = {
1109 { RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ" },
1110 { RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
1111};
1112
1108static void rx51_tsc2005_set_reset(bool enable) 1113static void rx51_tsc2005_set_reset(bool enable)
1109{ 1114{
1110 gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); 1115 gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
@@ -1114,20 +1119,18 @@ static void __init rx51_init_tsc2005(void)
1114{ 1119{
1115 int r; 1120 int r;
1116 1121
1117 r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ"); 1122 omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
1118 if (r < 0) { 1123 omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);
1119 printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ");
1120 rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0;
1121 }
1122 1124
1123 r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, 1125 r = gpio_request_array(rx51_tsc2005_gpios,
1124 "tsc2005 reset"); 1126 ARRAY_SIZE(rx51_tsc2005_gpios));
1125 if (r >= 0) { 1127 if (r < 0) {
1126 tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; 1128 printk(KERN_ERR "tsc2005 board initialization failed\n");
1127 } else {
1128 printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
1129 tsc2005_pdata.esd_timeout_ms = 0; 1129 tsc2005_pdata.esd_timeout_ms = 0;
1130 return;
1130 } 1131 }
1132
1133 tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
1131} 1134}
1132 1135
1133void __init rx51_peripherals_init(void) 1136void __init rx51_peripherals_init(void)