summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/panel-l-720p-5.c
diff options
context:
space:
mode:
authorBitan Biswas <bbiswas@nvidia.com>2013-01-10 12:59:06 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:50:15 -0700
commit771e76eba7a5a9a818acec044e1aa75d281f8e91 (patch)
tree06941c3a9c36a6e18b20c563a2fceaca663cac49 /arch/arm/mach-tegra/panel-l-720p-5.c
parent690660cd92f0f3fec68752b5cc69a7f944ea7cec (diff)
ARM: tegra: DSI instance selection
Moved the DSI instance and register selection from panel to board files. This effects Tegra11x boards: dalmore, pluto, pismo and ceres Further, panel GPIO selection moved to board files bug 1178654 Change-Id: I276d63f00cfc5bb95e8000cb725d12bab4464720 Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-on: http://git-master/r/190224 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm/mach-tegra/panel-l-720p-5.c')
-rw-r--r--arch/arm/mach-tegra/panel-l-720p-5.c44
1 files changed, 14 insertions, 30 deletions
diff --git a/arch/arm/mach-tegra/panel-l-720p-5.c b/arch/arm/mach-tegra/panel-l-720p-5.c
index c137d2e14e18..87ea2885999d 100644
--- a/arch/arm/mach-tegra/panel-l-720p-5.c
+++ b/arch/arm/mach-tegra/panel-l-720p-5.c
@@ -31,9 +31,6 @@
#include "board-panel.h"
#define DSI_PANEL_RESET 1
-#define DSI_PANEL_RST_GPIO TEGRA_GPIO_PH5
-#define DSI_PANEL_BL_EN_GPIO TEGRA_GPIO_PH2
-#define DSI_PANEL_BL_PWM TEGRA_GPIO_PH1
#define DC_CTRL_MODE TEGRA_DC_OUT_CONTINUOUS_MODE
@@ -394,6 +391,7 @@ fail:
return err;
}
+static struct tegra_dsi_out dsi_l_720p_5_pdata;
static int dsi_l_720p_5_gpio_get(void)
{
int err = 0;
@@ -401,19 +399,22 @@ static int dsi_l_720p_5_gpio_get(void)
if (dsi_l_720p_5_gpio_requested)
return 0;
- err = gpio_request(DSI_PANEL_RST_GPIO, "panel rst");
+ err = gpio_request(dsi_l_720p_5_pdata.dsi_panel_rst_gpio,
+ "panel rst");
if (err < 0) {
pr_err("panel reset gpio request failed\n");
goto fail;
}
- err = gpio_request(DSI_PANEL_BL_EN_GPIO, "panel backlight");
+ err = gpio_request(dsi_l_720p_5_pdata.dsi_panel_bl_en_gpio,
+ "panel backlight");
if (err < 0) {
pr_err("panel backlight gpio request failed\n");
goto fail;
}
- err = gpio_request(DSI_PANEL_BL_PWM, "panel pwm");
+ err = gpio_request(dsi_l_720p_5_pdata.dsi_panel_bl_pwm_gpio,
+ "panel pwm");
if (err < 0) {
pr_err("panel backlight pwm gpio request failed\n");
goto fail;
@@ -440,7 +441,7 @@ static int dsi_l_720p_5_enable(struct device *dev)
pr_err("dsi gpio request failed\n");
goto fail;
}
- gpio_direction_output(DSI_PANEL_RST_GPIO, 0);
+ gpio_direction_output(dsi_l_720p_5_pdata.dsi_panel_rst_gpio, 0);
if (avdd_lcd_3v0_2v8) {
err = regulator_enable(avdd_lcd_3v0_2v8);
@@ -472,15 +473,15 @@ static int dsi_l_720p_5_enable(struct device *dev)
usleep_range(3000, 5000);
#if DSI_PANEL_RESET
- gpio_set_value(DSI_PANEL_RST_GPIO, 1);
+ gpio_set_value(dsi_l_720p_5_pdata.dsi_panel_rst_gpio, 1);
usleep_range(1000, 5000);
- gpio_set_value(DSI_PANEL_RST_GPIO, 0);
+ gpio_set_value(dsi_l_720p_5_pdata.dsi_panel_rst_gpio, 0);
usleep_range(1000, 5000);
- gpio_set_value(DSI_PANEL_RST_GPIO, 1);
+ gpio_set_value(dsi_l_720p_5_pdata.dsi_panel_rst_gpio, 1);
msleep(20);
#endif
- gpio_direction_output(DSI_PANEL_BL_EN_GPIO, 1);
+ gpio_direction_output(dsi_l_720p_5_pdata.dsi_panel_bl_en_gpio, 1);
is_bl_powered = true;
return 0;
fail:
@@ -585,8 +586,6 @@ static struct tegra_dsi_cmd dsi_l_720p_5_init_cmd[] = {
static struct tegra_dsi_out dsi_l_720p_5_pdata = {
.n_data_lanes = 4,
- .dsi_instance = DSI_INSTANCE_0,
-
.refresh_rate = 60,
.video_data_type = TEGRA_DSI_VIDEO_TYPE_VIDEO_MODE,
.video_clock_mode = TEGRA_DSI_VIDEO_CLOCK_CONTINUOUS,
@@ -604,9 +603,9 @@ static struct tegra_dsi_out dsi_l_720p_5_pdata = {
static int dsi_l_720p_5_disable(void)
{
- gpio_set_value(DSI_PANEL_BL_EN_GPIO, 0);
+ gpio_set_value(dsi_l_720p_5_pdata.dsi_panel_bl_en_gpio, 0);
is_bl_powered = false;
- gpio_set_value(DSI_PANEL_RST_GPIO, 0);
+ gpio_set_value(dsi_l_720p_5_pdata.dsi_panel_rst_gpio, 0);
if (vdd_sys_bl_3v7)
regulator_disable(vdd_sys_bl_3v7);
@@ -620,20 +619,6 @@ static int dsi_l_720p_5_disable(void)
return 0;
}
-static void dsi_l_720p_5_resources_init(struct resource *
-resources, int n_resources)
-{
- int i;
- for (i = 0; i < n_resources; i++) {
- struct resource *r = &resources[i];
- if (resource_type(r) == IORESOURCE_MEM &&
- !strcmp(r->name, "dsi_regs")) {
- r->start = TEGRA_DSI_BASE;
- r->end = TEGRA_DSI_BASE + TEGRA_DSI_SIZE - 1;
- }
- }
-}
-
static void dsi_l_720p_5_dc_out_init(struct tegra_dc_out *dc)
{
dc->dsi = &dsi_l_720p_5_pdata;
@@ -668,7 +653,6 @@ struct tegra_panel __initdata dsi_l_720p_5 = {
.init_sd_settings = dsi_l_720p_5_sd_settings_init,
.init_dc_out = dsi_l_720p_5_dc_out_init,
.init_fb_data = dsi_l_720p_5_fb_data_init,
- .init_resources = dsi_l_720p_5_resources_init,
.register_bl_dev = dsi_l_720p_5_register_bl_dev,
#ifdef CONFIG_TEGRA_DC_CMU
.init_cmu_data = dsi_l_720p_5_cmu_init,