diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2012-04-27 14:48:45 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-05-11 08:13:51 -0400 |
commit | c0456be38fef2866b1dbeceb756485b001fa23b9 (patch) | |
tree | ff48172b118125d8f598d967c76561e02d89c497 /drivers/video/omap2/dss/hdmi.c | |
parent | 027bdc85ee74f8f456a47dc53154252ef7d1792f (diff) |
OMAPDSS: HDMI: Split video_enable into video_enable/disable
To improve readability, split the video_enable HDMI IP operation
into two separate functions for enabling and disabling video.
The video_enable function is also modified to return an error value.
While there, update these operations for the OMAP4 IP accordingly.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 2a011401c8f2..8f0549a2e796 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -324,7 +324,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
324 | 324 | ||
325 | hdmi_compute_pll(dssdev, phy, &hdmi.ip_data.pll_data); | 325 | hdmi_compute_pll(dssdev, phy, &hdmi.ip_data.pll_data); |
326 | 326 | ||
327 | hdmi.ip_data.ops->video_enable(&hdmi.ip_data, 0); | 327 | hdmi.ip_data.ops->video_disable(&hdmi.ip_data); |
328 | 328 | ||
329 | /* config the PLL and PHY hdmi_set_pll_pwrfirst */ | 329 | /* config the PLL and PHY hdmi_set_pll_pwrfirst */ |
330 | r = hdmi.ip_data.ops->pll_enable(&hdmi.ip_data); | 330 | r = hdmi.ip_data.ops->pll_enable(&hdmi.ip_data); |
@@ -358,7 +358,9 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
358 | /* tv size */ | 358 | /* tv size */ |
359 | dss_mgr_set_timings(dssdev->manager, &dssdev->panel.timings); | 359 | dss_mgr_set_timings(dssdev->manager, &dssdev->panel.timings); |
360 | 360 | ||
361 | hdmi.ip_data.ops->video_enable(&hdmi.ip_data, 1); | 361 | r = hdmi.ip_data.ops->video_enable(&hdmi.ip_data); |
362 | if (r) | ||
363 | goto err_vid_enable; | ||
362 | 364 | ||
363 | r = dss_mgr_enable(dssdev->manager); | 365 | r = dss_mgr_enable(dssdev->manager); |
364 | if (r) | 366 | if (r) |
@@ -367,7 +369,8 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
367 | return 0; | 369 | return 0; |
368 | 370 | ||
369 | err_mgr_enable: | 371 | err_mgr_enable: |
370 | hdmi.ip_data.ops->video_enable(&hdmi.ip_data, 0); | 372 | hdmi.ip_data.ops->video_disable(&hdmi.ip_data); |
373 | err_vid_enable: | ||
371 | hdmi.ip_data.ops->phy_disable(&hdmi.ip_data); | 374 | hdmi.ip_data.ops->phy_disable(&hdmi.ip_data); |
372 | hdmi.ip_data.ops->pll_disable(&hdmi.ip_data); | 375 | hdmi.ip_data.ops->pll_disable(&hdmi.ip_data); |
373 | err: | 376 | err: |
@@ -379,7 +382,7 @@ static void hdmi_power_off(struct omap_dss_device *dssdev) | |||
379 | { | 382 | { |
380 | dss_mgr_disable(dssdev->manager); | 383 | dss_mgr_disable(dssdev->manager); |
381 | 384 | ||
382 | hdmi.ip_data.ops->video_enable(&hdmi.ip_data, 0); | 385 | hdmi.ip_data.ops->video_disable(&hdmi.ip_data); |
383 | hdmi.ip_data.ops->phy_disable(&hdmi.ip_data); | 386 | hdmi.ip_data.ops->phy_disable(&hdmi.ip_data); |
384 | hdmi.ip_data.ops->pll_disable(&hdmi.ip_data); | 387 | hdmi.ip_data.ops->pll_disable(&hdmi.ip_data); |
385 | hdmi_runtime_put(); | 388 | hdmi_runtime_put(); |