aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/hdmi4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/hdmi4.c')
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi4.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c
index 916d47978f41..6d3aa3f51c20 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4.c
@@ -32,6 +32,7 @@
32#include <linux/clk.h> 32#include <linux/clk.h>
33#include <linux/gpio.h> 33#include <linux/gpio.h>
34#include <linux/regulator/consumer.h> 34#include <linux/regulator/consumer.h>
35#include <linux/component.h>
35#include <video/omapdss.h> 36#include <video/omapdss.h>
36#include <sound/omap-hdmi-audio.h> 37#include <sound/omap-hdmi-audio.h>
37 38
@@ -229,9 +230,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
229err_mgr_enable: 230err_mgr_enable:
230 hdmi_wp_video_stop(&hdmi.wp); 231 hdmi_wp_video_stop(&hdmi.wp);
231err_vid_enable: 232err_vid_enable:
232err_phy_cfg:
233 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 233 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
234err_phy_pwr: 234err_phy_pwr:
235err_phy_cfg:
235err_pll_cfg: 236err_pll_cfg:
236 dss_pll_disable(&hdmi.pll.pll); 237 dss_pll_disable(&hdmi.pll.pll);
237err_pll_enable: 238err_pll_enable:
@@ -646,8 +647,9 @@ static int hdmi_audio_register(struct device *dev)
646} 647}
647 648
648/* HDMI HW IP initialisation */ 649/* HDMI HW IP initialisation */
649static int omapdss_hdmihw_probe(struct platform_device *pdev) 650static int hdmi4_bind(struct device *dev, struct device *master, void *data)
650{ 651{
652 struct platform_device *pdev = to_platform_device(dev);
651 int r; 653 int r;
652 int irq; 654 int irq;
653 655
@@ -713,8 +715,10 @@ err:
713 return r; 715 return r;
714} 716}
715 717
716static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) 718static void hdmi4_unbind(struct device *dev, struct device *master, void *data)
717{ 719{
720 struct platform_device *pdev = to_platform_device(dev);
721
718 if (hdmi.audio_pdev) 722 if (hdmi.audio_pdev)
719 platform_device_unregister(hdmi.audio_pdev); 723 platform_device_unregister(hdmi.audio_pdev);
720 724
@@ -723,7 +727,21 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
723 hdmi_pll_uninit(&hdmi.pll); 727 hdmi_pll_uninit(&hdmi.pll);
724 728
725 pm_runtime_disable(&pdev->dev); 729 pm_runtime_disable(&pdev->dev);
730}
731
732static const struct component_ops hdmi4_component_ops = {
733 .bind = hdmi4_bind,
734 .unbind = hdmi4_unbind,
735};
726 736
737static int hdmi4_probe(struct platform_device *pdev)
738{
739 return component_add(&pdev->dev, &hdmi4_component_ops);
740}
741
742static int hdmi4_remove(struct platform_device *pdev)
743{
744 component_del(&pdev->dev, &hdmi4_component_ops);
727 return 0; 745 return 0;
728} 746}
729 747
@@ -756,8 +774,8 @@ static const struct of_device_id hdmi_of_match[] = {
756}; 774};
757 775
758static struct platform_driver omapdss_hdmihw_driver = { 776static struct platform_driver omapdss_hdmihw_driver = {
759 .probe = omapdss_hdmihw_probe, 777 .probe = hdmi4_probe,
760 .remove = __exit_p(omapdss_hdmihw_remove), 778 .remove = hdmi4_remove,
761 .driver = { 779 .driver = {
762 .name = "omapdss_hdmi", 780 .name = "omapdss_hdmi",
763 .pm = &hdmi_pm_ops, 781 .pm = &hdmi_pm_ops,
@@ -771,7 +789,7 @@ int __init hdmi4_init_platform_driver(void)
771 return platform_driver_register(&omapdss_hdmihw_driver); 789 return platform_driver_register(&omapdss_hdmihw_driver);
772} 790}
773 791
774void __exit hdmi4_uninit_platform_driver(void) 792void hdmi4_uninit_platform_driver(void)
775{ 793{
776 platform_driver_unregister(&omapdss_hdmihw_driver); 794 platform_driver_unregister(&omapdss_hdmihw_driver);
777} 795}