arm: tegra: roth: fix regulator in initialized mode
Rakesh Iyer [Thu, 21 Feb 2013 19:12:59 +0000 (11:12 -0800)]
Dont skip regulator setup in initialized mode.

Bug 1238868

Change-Id: I9df92fd152a177e72c066aa66ac1ac819e99707e
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/203012
(cherry picked from commit 9c803f9b450cbb71f288501fc5f366166809f382)
Reviewed-on: http://git-master/r/204249
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-roth-panel.c
drivers/video/tegra/dc/dc.c

index 4ff6487..6210da5 100644 (file)
@@ -318,6 +318,8 @@ fail:
        return err;
 }
 
+static struct tegra_dc_out roth_disp1_out;
+
 static int roth_dsi_panel_enable(struct device *dev)
 {
        int err = 0;
@@ -368,6 +370,10 @@ static int roth_dsi_panel_enable(struct device *dev)
                }
        }
 
+       /* Skip panel programming if in initialized mode */
+       if (roth_disp1_out.flags & TEGRA_DC_OUT_INITIALIZED_MODE)
+               return 0;
+
 #if DSI_PANEL_RESET
        gpio_direction_output(DSI_PANEL_RST_GPIO, 1);
        usleep_range(1000, 5000);
index ce0b1a1..e6ffd94 100644 (file)
@@ -1828,8 +1828,7 @@ static bool _tegra_dc_controller_enable(struct tegra_dc *dc)
 
        tegra_dc_unpowergate_locked(dc);
 
-       if (!(dc->out->flags & TEGRA_DC_OUT_INITIALIZED_MODE) &&
-           dc->out->enable)
+       if (dc->out->enable)
                dc->out->enable(&dc->ndev->dev);
 
        tegra_dc_setup_clk(dc, dc->clk);