diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 45 |
1 files changed, 6 insertions, 39 deletions
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); |