ARM: tegra: p852: get rid of tegra_gpio_enable()
Laxman Dewangan [Mon, 13 Aug 2012 05:49:41 +0000 (10:49 +0530)]
The gpio mode is enabled when setting direction and
disabled when freeing gpio and hence this call is no
more required.

Change-Id: I30647b96fa2a120fb323c18e97bc9936a95c305d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/122937
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/p852/board-p852-gpio.c
arch/arm/mach-tegra/p852/board-p852-sdhci.c
arch/arm/mach-tegra/p852/board-p852.c

index 71f5680..6272d36 100644 (file)
@@ -152,7 +152,6 @@ void __init p852_gpio_init(void)
 
        gpio_request_array(gpios_info, pin_count);
        for (i = 0; i < pin_count; i++) {
-               tegra_gpio_enable(gpios_info[i].gpio);
                gpio_export(gpios_info[i].gpio, true);
        }
 }
index dc5b81f..54fd42e 100644 (file)
@@ -165,7 +165,7 @@ void __init p852_sdhci_init(void)
                                        gpio_request(p852_sdhci_platform_data
                                                     [i].cd_gpio,
                                                     gpio_name[cd]);
-                                       tegra_gpio_enable
+                                       gpio_direction_input
                                            (p852_sdhci_platform_data[i].
                                             cd_gpio);
                                }
@@ -176,7 +176,7 @@ void __init p852_sdhci_init(void)
                                        gpio_request(p852_sdhci_platform_data
                                                     [i].wp_gpio,
                                                     gpio_name[wp]);
-                                       tegra_gpio_enable
+                                       gpio_direction_input
                                            (p852_sdhci_platform_data[i].
                                             wp_gpio);
                                }
@@ -187,7 +187,7 @@ void __init p852_sdhci_init(void)
                                        gpio_request(p852_sdhci_platform_data
                                                     [i].power_gpio,
                                                     gpio_name[pw]);
-                                       tegra_gpio_enable
+                                       gpio_direction_input
                                            (p852_sdhci_platform_data[i].
                                             power_gpio);
                                }
index 039d9db..0382d73 100644 (file)
@@ -342,12 +342,10 @@ static void p852_usb_gpio_config(void)
        if (has_onboard_ethernet) {
                gpio_request_one(usbeth_mux_gpio, GPIOF_OUT_INIT_LOW,
                                 "eth_ena");
-               tegra_gpio_enable(usbeth_mux_gpio);
 
                /* eth reset */
                gpio_request_one(p852_eth_reset, GPIOF_OUT_INIT_LOW,
                                 "eth_reset");
-               tegra_gpio_enable(p852_eth_reset);
                udelay(1);
                gpio_direction_output(p852_eth_reset, 1);
 
@@ -432,7 +430,6 @@ void __init p852_spi_i2s_init(void)
                gpio_request_one(pdata->gpio_i2s.gpio_no, GPIOF_OUT_INIT_HIGH,
                                 "i2s_cpld_dir1");
        }
-       tegra_gpio_enable(pdata->gpio_i2s.gpio_no);
        if (pdata->gpio_spi.active_state) {
                gpio_request_one(pdata->gpio_spi.gpio_no, GPIOF_OUT_INIT_LOW,
                                 "spi_cpld_dir2");
@@ -441,7 +438,6 @@ void __init p852_spi_i2s_init(void)
                                 "spi_cpld_dir2");
        }
 
-       tegra_gpio_enable(pdata->gpio_spi.gpio_no);
        spi_register_board_info(&tegra_spi_i2s_device, 1);
 }
 #endif
@@ -498,7 +494,6 @@ static void ulpi_link_platform_open(void)
 
        gpio_request(reset_gpio, "ulpi_phy_reset");
        gpio_direction_output(reset_gpio, 0);
-       tegra_gpio_enable(reset_gpio);
 
        gpio_direction_output(reset_gpio, 0);
        msleep(5);