summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/dsi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-08-08 10:04:31 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-12 13:40:23 +0200
commitf76b178a78e3aae0e88d88fb4113c3778ff4df70 (patch)
tree79beec2a49dea38a26d4dfc57ecf9cdd994cdf9f /drivers/video/fbdev/omap2/dss/dsi.c
parentdbb26e53e5a6eda5ee53fb36cdf3ca2517cfb135 (diff)
downloadtalos-op-linux-f76b178a78e3aae0e88d88fb4113c3778ff4df70.tar.gz
talos-op-linux-f76b178a78e3aae0e88d88fb4113c3778ff4df70.zip
OMAPDSS: DSI: dsi_runtime_get/put in pll_init
When DPI uses the DSI PLL for pixel clock, the DPI code will call dsi_runtime_get/put to keep the DSI block enabled. A much simpler way to handle this is to do dsi_runtime_get/put in DSI's dsi_pll_init() and dsi_pll_uninit(), thus removing the need for DSI to call the runtime PM functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/dsi.c')
-rw-r--r--drivers/video/fbdev/omap2/dss/dsi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c
index 22cc91851e94..e8415b5e877e 100644
--- a/drivers/video/fbdev/omap2/dss/dsi.c
+++ b/drivers/video/fbdev/omap2/dss/dsi.c
@@ -1144,7 +1144,7 @@ static u32 dsi_get_errors(struct platform_device *dsidev)
return e;
}
-int dsi_runtime_get(struct platform_device *dsidev)
+static int dsi_runtime_get(struct platform_device *dsidev)
{
int r;
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
@@ -1156,7 +1156,7 @@ int dsi_runtime_get(struct platform_device *dsidev)
return r < 0 ? r : 0;
}
-void dsi_runtime_put(struct platform_device *dsidev)
+static void dsi_runtime_put(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
int r;
@@ -1674,6 +1674,10 @@ int dsi_pll_init(struct platform_device *dsidev)
if (r)
return r;
+ r = dsi_runtime_get(dsidev);
+ if (r)
+ return r;
+
dsi_enable_pll_clock(dsidev, 1);
/*
* Note: SCP CLK is not required on OMAP3, but it is required on OMAP4.
@@ -1717,6 +1721,7 @@ err1:
err0:
dsi_disable_scp_clk(dsidev);
dsi_enable_pll_clock(dsidev, 0);
+ dsi_runtime_put(dsidev);
return r;
}
@@ -1733,6 +1738,7 @@ void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes)
dsi_disable_scp_clk(dsidev);
dsi_enable_pll_clock(dsidev, 0);
+ dsi_runtime_put(dsidev);
DSSDBG("PLL uninit done\n");
}
OpenPOWER on IntegriCloud