aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/arm/mach-omap2/display.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 40c135696007..54d49ddb9b81 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -327,7 +327,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
327 dss_pdev = create_dss_pdev(curr_dss_hwmod[0].dev_name, 327 dss_pdev = create_dss_pdev(curr_dss_hwmod[0].dev_name,
328 curr_dss_hwmod[0].id, 328 curr_dss_hwmod[0].id,
329 curr_dss_hwmod[0].oh_name, 329 curr_dss_hwmod[0].oh_name,
330 NULL, 0, 330 board_data, sizeof(*board_data),
331 NULL); 331 NULL);
332 332
333 if (IS_ERR(dss_pdev)) { 333 if (IS_ERR(dss_pdev)) {
@@ -341,7 +341,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
341 pdev = create_dss_pdev(curr_dss_hwmod[i].dev_name, 341 pdev = create_dss_pdev(curr_dss_hwmod[i].dev_name,
342 curr_dss_hwmod[i].id, 342 curr_dss_hwmod[i].id,
343 curr_dss_hwmod[i].oh_name, 343 curr_dss_hwmod[i].oh_name,
344 NULL, 0, 344 board_data, sizeof(*board_data),
345 dss_pdev); 345 dss_pdev);
346 346
347 if (IS_ERR(pdev)) { 347 if (IS_ERR(pdev)) {
@@ -354,15 +354,16 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
354 354
355 /* Create devices for DPI and SDI */ 355 /* Create devices for DPI and SDI */
356 356
357 pdev = create_simple_dss_pdev("omapdss_dpi", -1, NULL, 0, dss_pdev); 357 pdev = create_simple_dss_pdev("omapdss_dpi", -1,
358 board_data, sizeof(*board_data), dss_pdev);
358 if (IS_ERR(pdev)) { 359 if (IS_ERR(pdev)) {
359 pr_err("Could not build platform_device for omapdss_dpi\n"); 360 pr_err("Could not build platform_device for omapdss_dpi\n");
360 return PTR_ERR(pdev); 361 return PTR_ERR(pdev);
361 } 362 }
362 363
363 if (cpu_is_omap34xx()) { 364 if (cpu_is_omap34xx()) {
364 pdev = create_simple_dss_pdev("omapdss_sdi", -1, NULL, 0, 365 pdev = create_simple_dss_pdev("omapdss_sdi", -1,
365 dss_pdev); 366 board_data, sizeof(*board_data), dss_pdev);
366 if (IS_ERR(pdev)) { 367 if (IS_ERR(pdev)) {
367 pr_err("Could not build platform_device for omapdss_sdi\n"); 368 pr_err("Could not build platform_device for omapdss_sdi\n");
368 return PTR_ERR(pdev); 369 return PTR_ERR(pdev);