aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/hdmi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-03-01 08:45:53 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 07:52:23 -0400
commit35deca3de6190b6bc03e34ed45de079047f834ab (patch)
tree6e778144d508dc5550cb105b39d06a522459069a /drivers/video/omap2/dss/hdmi.c
parentc018c6738bdae8c9f49766fd3d8b3770be2572f9 (diff)
OMAPDSS: interface drivers register their panel devices
Currently the higher level omapdss platform driver gets the list of displays in its platform data, and uses that list to create the omap_dss_device for each display. With DT, the logical way to do the above is to list the displays under each individual output, i.e. we'd have "dpi" node, under which we would have the display that uses DPI. In other words, each output driver handles the displays that use that particular output. To make the current code ready for DT, this patch modifies the output drivers so that each of them creates the display devices which use that output. However, instead of changing the platform data to suit this method, each output driver is passed the full list of displays, and the drivers pick the displays that are meant for them. This allows us to keep the old platform data, and thus we avoid the need to change the board files. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r--drivers/video/omap2/dss/hdmi.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 09ede7fa1983..faa91441a6b0 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -774,8 +774,9 @@ static void hdmi_put_clocks(void)
774/* HDMI HW IP initialisation */ 774/* HDMI HW IP initialisation */
775static int __init omapdss_hdmihw_probe(struct platform_device *pdev) 775static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
776{ 776{
777 struct omap_dss_board_info *pdata = pdev->dev.platform_data;
777 struct resource *hdmi_mem; 778 struct resource *hdmi_mem;
778 int r; 779 int r, i;
779 780
780 hdmi.pdev = pdev; 781 hdmi.pdev = pdev;
781 782
@@ -812,6 +813,18 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
812 813
813 dss_debugfs_create_file("hdmi", hdmi_dump_regs); 814 dss_debugfs_create_file("hdmi", hdmi_dump_regs);
814 815
816 for (i = 0; i < pdata->num_devices; ++i) {
817 struct omap_dss_device *dssdev = pdata->devices[i];
818
819 if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI)
820 continue;
821
822 r = omap_dss_register_device(dssdev, &pdev->dev, i);
823 if (r)
824 DSSERR("device %s register failed: %d\n",
825 dssdev->name, r);
826 }
827
815#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ 828#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
816 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE) 829 defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
817 830
@@ -828,6 +841,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
828 841
829static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) 842static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
830{ 843{
844 omap_dss_unregister_child_devices(&pdev->dev);
845
831 hdmi_panel_exit(); 846 hdmi_panel_exit();
832 847
833#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \ 848#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \