aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.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/dpi.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/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 6061379559c..35eb2970693 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -367,11 +367,28 @@ int dpi_init_display(struct omap_dss_device *dssdev)
367 367
368static int __init omap_dpi_probe(struct platform_device *pdev) 368static int __init omap_dpi_probe(struct platform_device *pdev)
369{ 369{
370 struct omap_dss_board_info *pdata = pdev->dev.platform_data;
371 int i, r;
372
373 for (i = 0; i < pdata->num_devices; ++i) {
374 struct omap_dss_device *dssdev = pdata->devices[i];
375
376 if (dssdev->type != OMAP_DISPLAY_TYPE_DPI)
377 continue;
378
379 r = omap_dss_register_device(dssdev, &pdev->dev, i);
380 if (r)
381 DSSERR("device %s register failed: %d\n",
382 dssdev->name, r);
383 }
384
370 return 0; 385 return 0;
371} 386}
372 387
373static int __exit omap_dpi_remove(struct platform_device *pdev) 388static int __exit omap_dpi_remove(struct platform_device *pdev)
374{ 389{
390 omap_dss_unregister_child_devices(&pdev->dev);
391
375 return 0; 392 return 0;
376} 393}
377 394