diff options
author | Ashwini Ghuge <aghuge@nvidia.com> | 2012-05-16 17:13:28 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-05-25 14:38:59 -0700 |
commit | 74738bbea584783fcf4cf293e0c53ac352e2b1ae (patch) | |
tree | 05d183f8f5612aa2082d8850d120e68c7e8eb859 /arch | |
parent | 5f965f2c63d3e9c6b335d1f6337c83c1f5437739 (diff) |
ARM: tegra: cardhu: Remove tegra_gpio_enb/disable
Removing tegra_gpio_enable and disable calls
from board files as they are supported through
set direction calls in the driver
Bug 984439
Change-Id: I51b17389dbb17b0e94e1635ec6d68acd01c743b4
Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Reviewed-on: http://git-master/r/102529
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-kbc.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-pinmux.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-power.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sdhci.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 35 |
9 files changed, 7 insertions, 115 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-kbc.c b/arch/arm/mach-tegra/board-cardhu-kbc.c index 16e83bbb03f8..28402f0834ef 100644 --- a/arch/arm/mach-tegra/board-cardhu-kbc.c +++ b/arch/arm/mach-tegra/board-cardhu-kbc.c @@ -252,8 +252,6 @@ int __init cardhu_keys_init(void) if (get_tegra_image_type() == rck_image) cardhu_keys_e1291_pdata.buttons[i].code = KEY_ENTER; - } else { - tegra_gpio_enable(gpio_nr); } } @@ -265,8 +263,6 @@ int __init cardhu_keys_init(void) if (gpio_nr < 0) { if (get_tegra_image_type() == rck_image) cardhu_keys_e1198[i].code = KEY_ENTER; - } else { - tegra_gpio_enable(gpio_nr); } } diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index 4899dee38042..a62171060b84 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -144,8 +144,6 @@ static int cardhu_backlight_init(struct device *dev) pr_err("bl_output array does not have 256 elements\n"); #ifndef CONFIG_TEGRA_CARDHU_DSI - tegra_gpio_disable(cardhu_bl_pwm); - ret = gpio_request(cardhu_bl_enb, "backlight_enb"); if (ret < 0) return ret; @@ -153,8 +151,6 @@ static int cardhu_backlight_init(struct device *dev) ret = gpio_direction_output(cardhu_bl_enb, 1); if (ret < 0) gpio_free(cardhu_bl_enb); - else - tegra_gpio_enable(cardhu_bl_enb); return ret; #endif @@ -168,8 +164,6 @@ static int cardhu_backlight_init(struct device *dev) ret = gpio_direction_output(cardhu_dsia_bl_enb, 1); if (ret < 0) gpio_free(cardhu_dsia_bl_enb); - else - tegra_gpio_enable(cardhu_dsia_bl_enb); /* Enable back light for DSIb panel */ ret = gpio_request(cardhu_dsib_bl_enb, "dsib_bl_enable"); @@ -179,8 +173,6 @@ static int cardhu_backlight_init(struct device *dev) ret = gpio_direction_output(cardhu_dsib_bl_enb, 1); if (ret < 0) gpio_free(cardhu_dsib_bl_enb); - else - tegra_gpio_enable(cardhu_dsib_bl_enb); #endif #if DSI_PANEL_219 @@ -192,8 +184,6 @@ static int cardhu_backlight_init(struct device *dev) ret = gpio_direction_output(cardhu_dsia_bl_enb, 1); if (ret < 0) gpio_free(cardhu_dsia_bl_enb); - else - tegra_gpio_enable(cardhu_dsia_bl_enb); #endif return ret; @@ -206,7 +196,6 @@ static void cardhu_backlight_exit(struct device *dev) /*ret = gpio_request(cardhu_bl_enb, "backlight_enb");*/ gpio_set_value(cardhu_bl_enb, 0); gpio_free(cardhu_bl_enb); - tegra_gpio_disable(cardhu_bl_enb); return; #endif @@ -214,12 +203,11 @@ static void cardhu_backlight_exit(struct device *dev) /* Disable back light for DSIa panel */ gpio_set_value(cardhu_dsia_bl_enb, 0); gpio_free(cardhu_dsia_bl_enb); - tegra_gpio_disable(cardhu_dsia_bl_enb); + /* Disable back light for DSIb panel */ gpio_set_value(cardhu_dsib_bl_enb, 0); gpio_free(cardhu_dsib_bl_enb); - tegra_gpio_disable(cardhu_dsib_bl_enb); gpio_set_value(cardhu_lvds_shutdown, 1); mdelay(20); @@ -229,7 +217,7 @@ static void cardhu_backlight_exit(struct device *dev) /* Disable back light for DSIa panel */ gpio_set_value(cardhu_dsia_bl_enb, 0); gpio_free(cardhu_dsia_bl_enb); - tegra_gpio_disable(cardhu_dsia_bl_enb); + gpio_set_value(cardhu_lvds_shutdown, 1); mdelay(20); @@ -762,8 +750,6 @@ static int cardhu_dsi_panel_enable(void) ret = gpio_direction_output(AVDD_LCD, 1); if (ret < 0) gpio_free(AVDD_LCD); - else - tegra_gpio_enable(AVDD_LCD); #if DSI_PANEL_219 @@ -774,8 +760,7 @@ static int cardhu_dsi_panel_enable(void) if (ret < 0) { gpio_free(cardhu_bl_pwm); return ret; - } else - tegra_gpio_enable(cardhu_bl_pwm); + } ret = gpio_request(cardhu_bl_enb, "bl_enb"); if (ret < 0) @@ -784,8 +769,7 @@ static int cardhu_dsi_panel_enable(void) if (ret < 0) { gpio_free(cardhu_bl_enb); return ret; - } else - tegra_gpio_enable(cardhu_bl_enb); + } gpio_set_value(cardhu_lvds_shutdown, 1); mdelay(20); @@ -805,8 +789,7 @@ static int cardhu_dsi_panel_enable(void) if (ret < 0) { gpio_free(cardhu_dsi_218_panel_reset); return ret; - } else - tegra_gpio_enable(cardhu_dsi_218_panel_reset); + } gpio_set_value(cardhu_dsi_218_panel_reset, 1); gpio_set_value(cardhu_dsi_218_panel_reset, 0); @@ -823,8 +806,7 @@ static int cardhu_dsi_panel_enable(void) if (ret < 0) { gpio_free(cardhu_dsi_219_panel_reset); return ret; - } else - tegra_gpio_enable(cardhu_dsi_219_panel_reset); + } gpio_set_value(cardhu_dsi_219_panel_reset, 0); gpio_set_value(cardhu_dsi_219_panel_reset, 1); @@ -847,18 +829,13 @@ static int cardhu_dsi_panel_disable(void) printk(KERN_INFO "DSI panel disable\n"); #if DSI_PANEL_219 - tegra_gpio_disable(cardhu_dsi_219_panel_reset); gpio_free(cardhu_dsi_219_panel_reset); - tegra_gpio_disable(cardhu_bl_enb); gpio_free(cardhu_bl_enb); - tegra_gpio_disable(cardhu_bl_pwm); gpio_free(cardhu_bl_pwm); - tegra_gpio_disable(cardhu_lvds_shutdown); gpio_free(cardhu_lvds_shutdown); #endif #if DSI_PANEL_218 - tegra_gpio_disable(cardhu_dsi_218_panel_reset); gpio_free(cardhu_dsi_218_panel_reset); #endif @@ -882,7 +859,6 @@ static int cardhu_dsi_panel_postsuspend(void) } #if DSI_PANEL_218 - tegra_gpio_disable(AVDD_LCD); gpio_free(AVDD_LCD); #endif @@ -1222,28 +1198,22 @@ int __init cardhu_panel_init(void) /* lvds configuration */ err = gpio_request(pm313_R_FDE, "R_FDE"); err |= gpio_direction_output(pm313_R_FDE, 1); - tegra_gpio_enable(pm313_R_FDE); err |= gpio_request(pm313_R_FB, "R_FB"); err |= gpio_direction_output(pm313_R_FB, 1); - tegra_gpio_enable(pm313_R_FB); err |= gpio_request(pm313_MODE0, "MODE0"); err |= gpio_direction_output(pm313_MODE0, 1); - tegra_gpio_enable(pm313_MODE0); err |= gpio_request(pm313_MODE1, "MODE1"); err |= gpio_direction_output(pm313_MODE1, 0); - tegra_gpio_enable(pm313_MODE1); err |= gpio_request(pm313_BPP, "BPP"); err |= gpio_direction_output(pm313_BPP, PM313_LVDS_PANEL_BPP); - tegra_gpio_enable(pm313_BPP); err = gpio_request(pm313_lvds_shutdown, "lvds_shutdown"); /* free ride provided by bootloader */ err |= gpio_direction_output(pm313_lvds_shutdown, 1); - tegra_gpio_enable(pm313_lvds_shutdown); if (err) printk(KERN_ERR "ERROR(s) in LVDS configuration\n"); @@ -1254,15 +1224,12 @@ int __init cardhu_panel_init(void) (board_info.board_id == BOARD_PM311)) { gpio_request(e1247_pm269_lvds_shutdown, "lvds_shutdown"); gpio_direction_output(e1247_pm269_lvds_shutdown, 1); - tegra_gpio_enable(e1247_pm269_lvds_shutdown); } else { gpio_request(cardhu_lvds_shutdown, "lvds_shutdown"); gpio_direction_output(cardhu_lvds_shutdown, 1); - tegra_gpio_enable(cardhu_lvds_shutdown); } #endif - tegra_gpio_enable(cardhu_hdmi_hpd); gpio_request(cardhu_hdmi_hpd, "hdmi_hpd"); gpio_direction_input(cardhu_hdmi_hpd); diff --git a/arch/arm/mach-tegra/board-cardhu-pinmux.c b/arch/arm/mach-tegra/board-cardhu-pinmux.c index fd0a6ae34ffc..8b6bb681a68d 100644 --- a/arch/arm/mach-tegra/board-cardhu-pinmux.c +++ b/arch/arm/mach-tegra/board-cardhu-pinmux.c @@ -544,11 +544,8 @@ static __initdata struct tegra_pingroup_config gmi_pins_269[] = { static void __init cardhu_pinmux_audio_init(void) { - tegra_gpio_enable(TEGRA_GPIO_CDC_IRQ); gpio_request(TEGRA_GPIO_CDC_IRQ, "wm8903"); gpio_direction_input(TEGRA_GPIO_CDC_IRQ); - - tegra_gpio_enable(TEGRA_GPIO_HP_DET); } #define GPIO_INIT_PIN_MODE(_gpio, _is_input, _value) \ @@ -755,7 +752,6 @@ static void set_unused_pin_gpio(struct gpio_init_pin_info *lpm_pin_info, gpio_free(pin_info->gpio_nr); continue; } - tegra_gpio_enable(pin_info->gpio_nr); } } diff --git a/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c b/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c index 0305ee702cbd..f0dc8afa56fe 100644 --- a/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c +++ b/arch/arm/mach-tegra/board-cardhu-pm298-power-rails.c @@ -698,12 +698,5 @@ int __init cardhu_pm298_gpio_switch_regulator_init(void) break; } - for (i = 0; i < nfixreg_devs; ++i) { - struct fixed_voltage_config *fixed_reg_pdata = - fixed_reg_devs[i]->dev.platform_data; - int gpio_nr = fixed_reg_pdata->gpio; - if (gpio_nr < TEGRA_NR_GPIOS) - tegra_gpio_enable(gpio_nr); - } return platform_add_devices(fixed_reg_devs, nfixreg_devs); } diff --git a/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c b/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c index 0c55aa49acc0..6d4db73b6ecd 100644 --- a/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c +++ b/arch/arm/mach-tegra/board-cardhu-pm299-power-rails.c @@ -688,12 +688,5 @@ int __init cardhu_pm299_gpio_switch_regulator_init(void) break; } - for (i = 0; i < nfixreg_devs; ++i) { - struct fixed_voltage_config *fixed_reg_pdata = - fixed_reg_devs[i]->dev.platform_data; - int gpio_nr = fixed_reg_pdata->gpio; - if (gpio_nr < TEGRA_NR_GPIOS) - tegra_gpio_enable(gpio_nr); - } return platform_add_devices(fixed_reg_devs, nfixreg_devs); } diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c index 79d8d6116edc..587a8c49d471 100644 --- a/arch/arm/mach-tegra/board-cardhu-power.c +++ b/arch/arm/mach-tegra/board-cardhu-power.c @@ -1072,13 +1072,6 @@ int __init cardhu_fixed_regulator_init(void) break; } - for (i = 0; i < nfixreg_devs; ++i) { - struct fixed_voltage_config *fixed_reg_pdata = - fixed_reg_devs[i]->dev.platform_data; - int gpio_nr = fixed_reg_pdata->gpio; - if (gpio_nr < TEGRA_NR_GPIOS) - tegra_gpio_enable(gpio_nr); - } return platform_add_devices(fixed_reg_devs, nfixreg_devs); } subsys_initcall_sync(cardhu_fixed_regulator_init); diff --git a/arch/arm/mach-tegra/board-cardhu-sdhci.c b/arch/arm/mach-tegra/board-cardhu-sdhci.c index c4e631ddc108..cb0684bcc742 100644 --- a/arch/arm/mach-tegra/board-cardhu-sdhci.c +++ b/arch/arm/mach-tegra/board-cardhu-sdhci.c @@ -280,10 +280,6 @@ static int __init cardhu_wifi_init(void) if (rc) pr_err("WLAN_WOW gpio request failed:%d\n", rc); - tegra_gpio_enable(CARDHU_WLAN_PWR); - tegra_gpio_enable(CARDHU_WLAN_RST); - tegra_gpio_enable(CARDHU_WLAN_WOW); - rc = gpio_direction_output(CARDHU_WLAN_PWR, 0); if (rc) pr_err("WLAN_PWR gpio direction configuration failed:%d\n", rc); diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 66b3c9dc8ef3..b4fd1a2a1765 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -87,24 +87,20 @@ static int cardhu_camera_init(void) * and donot have TCA6416 exp for camera */ if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291)) { - tegra_gpio_enable(CAM1_POWER_DWN_GPIO); ret = gpio_request(CAM1_POWER_DWN_GPIO, "camera_power_en"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %s\n", __func__, "CAM1_POWER_DWN_GPIO"); - tegra_gpio_enable(CAM3_POWER_DWN_GPIO); ret = gpio_request(CAM3_POWER_DWN_GPIO, "cam3_power_en"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %s\n", __func__, "CAM3_POWER_DWN_GPIO"); - tegra_gpio_enable(CAM2_POWER_DWN_GPIO); ret = gpio_request(CAM2_POWER_DWN_GPIO, "camera2_power_en"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %s\n", __func__, "CAM2_POWER_DWN_GPIO"); - tegra_gpio_enable(OV5650_RESETN_GPIO); ret = gpio_request(OV5650_RESETN_GPIO, "camera_reset"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %s\n", @@ -124,7 +120,6 @@ static int cardhu_camera_init(void) } /* To select the CSIB MUX either for cam2 or cam3 */ - tegra_gpio_enable(CAMERA_CSI_MUX_SEL_GPIO); ret = gpio_request(CAMERA_CSI_MUX_SEL_GPIO, "camera_csi_sel"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %s\n", @@ -785,8 +780,6 @@ static int cardhu_nct1008_init(void) ret = gpio_direction_input(nct1008_port); if (ret < 0) gpio_free(nct1008_port); - else - tegra_gpio_enable(nct1008_port); } return ret; @@ -916,7 +909,6 @@ static void mpuirq_init(void) #if (MPU_GYRO_TYPE == MPU_TYPE_MPU3050) #if MPU_ACCEL_IRQ_GPIO /* ACCEL-IRQ assignment */ - tegra_gpio_enable(MPU_ACCEL_IRQ_GPIO); ret = gpio_request(MPU_ACCEL_IRQ_GPIO, MPU_ACCEL_NAME); if (ret < 0) { pr_err("%s: gpio_request failed %d\n", __func__, ret); @@ -933,7 +925,6 @@ static void mpuirq_init(void) #endif /* MPU-IRQ assignment */ - tegra_gpio_enable(MPU_GYRO_IRQ_GPIO); ret = gpio_request(MPU_GYRO_IRQ_GPIO, MPU_GYRO_NAME); if (ret < 0) { pr_err("%s: gpio_request failed %d\n", __func__, ret); diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index b57bec4dbf7d..5994b7d399b2 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -133,8 +133,6 @@ static struct platform_device cardhu_bluesleep_device = { static noinline void __init cardhu_setup_bluesleep(void) { platform_device_register(&cardhu_bluesleep_device); - tegra_gpio_enable(TEGRA_GPIO_PU6); - tegra_gpio_enable(TEGRA_GPIO_PU1); return; } @@ -808,9 +806,6 @@ static int __init cardhu_touch_init(void) touch_init_raydium(TEGRA_GPIO_PH4, TEGRA_GPIO_PH6, 2); } else { - tegra_gpio_enable(TEGRA_GPIO_PH4); - tegra_gpio_enable(TEGRA_GPIO_PH6); - gpio_request(TEGRA_GPIO_PH4, "atmel-irq"); gpio_direction_input(TEGRA_GPIO_PH4); @@ -1120,19 +1115,6 @@ static void cardhu_usb_init(void) static void cardhu_usb_init(void) { } #endif -static void cardhu_gps_init(void) -{ - tegra_gpio_enable(TEGRA_GPIO_PU2); - tegra_gpio_enable(TEGRA_GPIO_PU3); -} - -static void cardhu_nfc_init(void) -{ - tegra_gpio_enable(TEGRA_GPIO_PX0); - tegra_gpio_enable(TEGRA_GPIO_PP3); - tegra_gpio_enable(TEGRA_GPIO_PO7); -} - static struct baseband_power_platform_data tegra_baseband_power_data = { .baseband_type = BASEBAND_XMM, .modem = { @@ -1210,7 +1192,7 @@ static void cardhu_modem_init(void) } else { w_disable_gpio = TEGRA_GPIO_PDD5; } - tegra_gpio_enable(w_disable_gpio); + ret = gpio_request(w_disable_gpio, "w_disable_gpio"); if (ret < 0) pr_err("%s: gpio_request failed for gpio %d\n", @@ -1230,22 +1212,9 @@ static void cardhu_modem_init(void) break; } gpio_direction_output(TEGRA_GPIO_PH7, 1); - tegra_gpio_enable(TEGRA_GPIO_PH7); } break; case BOARD_E1186: - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.bb_rst); - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.bb_on); - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.ipc_bb_wake); - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.ipc_ap_wake); - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.ipc_hsic_active); - tegra_gpio_enable( - tegra_baseband_power_data.modem.xmm.ipc_hsic_sus_req); platform_device_register(&tegra_baseband_power_device); platform_device_register(&tegra_baseband_power2_device); break; @@ -1283,7 +1252,6 @@ static void __init tegra_cardhu_init(void) cardhu_dtv_init(); cardhu_suspend_init(); cardhu_touch_init(); - cardhu_gps_init(); cardhu_modem_init(); cardhu_kbc_init(); cardhu_scroll_init(); @@ -1297,7 +1265,6 @@ static void __init tegra_cardhu_init(void) cardhu_pins_state_init(); cardhu_emc_init(); tegra_release_bootloader_fb(); - cardhu_nfc_init(); cardhu_pci_init(); #ifdef CONFIG_TEGRA_WDT_RECOVERY tegra_wdt_recovery_init(); |