goto err_src_sel;
if (dpi->dsidev) {
- r = dsi_runtime_get(dpi->dsidev);
- if (r)
- goto err_get_dsi;
-
r = dsi_pll_init(dpi->dsidev);
if (r)
goto err_dsi_pll_init;
if (dpi->dsidev)
dsi_pll_uninit(dpi->dsidev, true);
err_dsi_pll_init:
- if (dpi->dsidev)
- dsi_runtime_put(dpi->dsidev);
-err_get_dsi:
err_src_sel:
dispc_runtime_put();
err_get_dispc:
if (dpi->dsidev) {
dss_select_lcd_clk_source(mgr->id, OMAP_DSS_CLK_SRC_FCK);
dsi_pll_uninit(dpi->dsidev, true);
- dsi_runtime_put(dpi->dsidev);
}
dispc_runtime_put();
/* do initial setup with the PLL to see if it is operational */
- r = dsi_runtime_get(dsidev);
- if (r)
- return r;
-
r = dsi_pll_init(dsidev);
- if (r) {
- dsi_runtime_put(dsidev);
+ if (r)
return r;
- }
dsi_pll_uninit(dsidev, true);
- dsi_runtime_put(dsidev);
return 0;
}
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);
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;
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.
err0:
dsi_disable_scp_clk(dsidev);
dsi_enable_pll_clock(dsidev, 0);
+ dsi_runtime_put(dsidev);
return r;
}
dsi_disable_scp_clk(dsidev);
dsi_enable_pll_clock(dsidev, 0);
+ dsi_runtime_put(dsidev);
DSSDBG("PLL uninit done\n");
}
int dsi_init_platform_driver(void) __init;
void dsi_uninit_platform_driver(void) __exit;
-int dsi_runtime_get(struct platform_device *dsidev);
-void dsi_runtime_put(struct platform_device *dsidev);
-
void dsi_dump_clocks(struct seq_file *s);
void dsi_irq_handler(void);
void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes);
struct platform_device *dsi_get_dsidev_from_id(int module);
#else
-static inline int dsi_runtime_get(struct platform_device *dsidev)
-{
- return 0;
-}
-static inline void dsi_runtime_put(struct platform_device *dsidev)
-{
-}
static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt)
{
WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__);