diff options
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/hdmi4.c')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/hdmi4.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c index 31deebbc32dc..d35312d69025 100644 --- a/drivers/video/fbdev/omap2/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/dss/hdmi4.c @@ -32,6 +32,7 @@ #include <linux/clk.h> #include <linux/gpio.h> #include <linux/regulator/consumer.h> +#include <linux/component.h> #include <video/omapdss.h> #include <sound/omap-hdmi-audio.h> @@ -646,8 +647,9 @@ static int hdmi_audio_register(struct device *dev) } /* HDMI HW IP initialisation */ -static int omapdss_hdmihw_probe(struct platform_device *pdev) +static int hdmi4_bind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); int r; int irq; @@ -713,8 +715,10 @@ err: return r; } -static int omapdss_hdmihw_remove(struct platform_device *pdev) +static void hdmi4_unbind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); + if (hdmi.audio_pdev) platform_device_unregister(hdmi.audio_pdev); @@ -723,7 +727,21 @@ static int omapdss_hdmihw_remove(struct platform_device *pdev) hdmi_pll_uninit(&hdmi.pll); pm_runtime_disable(&pdev->dev); +} + +static const struct component_ops hdmi4_component_ops = { + .bind = hdmi4_bind, + .unbind = hdmi4_unbind, +}; +static int hdmi4_probe(struct platform_device *pdev) +{ + return component_add(&pdev->dev, &hdmi4_component_ops); +} + +static int hdmi4_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &hdmi4_component_ops); return 0; } @@ -756,8 +774,8 @@ static const struct of_device_id hdmi_of_match[] = { }; static struct platform_driver omapdss_hdmihw_driver = { - .probe = omapdss_hdmihw_probe, - .remove = omapdss_hdmihw_remove, + .probe = hdmi4_probe, + .remove = hdmi4_remove, .driver = { .name = "omapdss_hdmi", .pm = &hdmi_pm_ops, |