diff options
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index f6800e19bbcb..ee1fa1e1a015 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -44,6 +44,8 @@ static struct { | |||
44 | struct omap_video_timings timings; | 44 | struct omap_video_timings timings; |
45 | struct dss_lcd_mgr_config mgr_config; | 45 | struct dss_lcd_mgr_config mgr_config; |
46 | int data_lines; | 46 | int data_lines; |
47 | |||
48 | struct omap_dss_output output; | ||
47 | } dpi; | 49 | } dpi; |
48 | 50 | ||
49 | static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) | 51 | static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) |
@@ -436,10 +438,30 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev) | |||
436 | } | 438 | } |
437 | } | 439 | } |
438 | 440 | ||
441 | static void __init dpi_init_output(struct platform_device *pdev) | ||
442 | { | ||
443 | struct omap_dss_output *out = &dpi.output; | ||
444 | |||
445 | out->pdev = pdev; | ||
446 | out->id = OMAP_DSS_OUTPUT_DPI; | ||
447 | out->type = OMAP_DISPLAY_TYPE_DPI; | ||
448 | |||
449 | dss_register_output(out); | ||
450 | } | ||
451 | |||
452 | static void __exit dpi_uninit_output(struct platform_device *pdev) | ||
453 | { | ||
454 | struct omap_dss_output *out = &dpi.output; | ||
455 | |||
456 | dss_unregister_output(out); | ||
457 | } | ||
458 | |||
439 | static int __init omap_dpi_probe(struct platform_device *pdev) | 459 | static int __init omap_dpi_probe(struct platform_device *pdev) |
440 | { | 460 | { |
441 | mutex_init(&dpi.lock); | 461 | mutex_init(&dpi.lock); |
442 | 462 | ||
463 | dpi_init_output(pdev); | ||
464 | |||
443 | dpi_probe_pdata(pdev); | 465 | dpi_probe_pdata(pdev); |
444 | 466 | ||
445 | return 0; | 467 | return 0; |
@@ -449,6 +471,8 @@ static int __exit omap_dpi_remove(struct platform_device *pdev) | |||
449 | { | 471 | { |
450 | dss_unregister_child_devices(&pdev->dev); | 472 | dss_unregister_child_devices(&pdev->dev); |
451 | 473 | ||
474 | dpi_uninit_output(pdev); | ||
475 | |||
452 | return 0; | 476 | return 0; |
453 | } | 477 | } |
454 | 478 | ||