diff options
author | Archit Taneja <archit@ti.com> | 2012-09-26 16:30:49 +0530 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-09-26 16:30:49 +0530 |
commit | 81b87f515f6abbbe4eef42835065db9d0831ef35 (patch) | |
tree | 3eebf0e10cd70425bb80c60202236f8a2ce96a38 /drivers/video/omap2/dss/sdi.c | |
parent | 484dc404d233696ef65a8e676f9d4fe563b091ee (diff) | |
download | op-kernel-dev-81b87f515f6abbbe4eef42835065db9d0831ef35.zip op-kernel-dev-81b87f515f6abbbe4eef42835065db9d0831ef35.tar.gz |
OMAPDSS: outputs: Create and register output instances
Add output structs to output driver's private data. Register output instances by
having an init function in the probes of the platform device drivers for
different outputs. The *_init_output for each output registers the output and
fill up the output's plaform device, type and id fields. The *_uninit_output
functions unregister the output.
In the probe of each interface driver, the output entities are initialized
before the *_probe_pdata() functions intentionally. This is done to ensure that
the output entity is prepared before the panels connected to the output are
registered. We need the output entities to be ready because OMAPDSS will try
to make connections between overlays, managers, outputs and devices during the
panel's probe.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/sdi.c')
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 919ff72..47f9fe4 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -36,6 +36,8 @@ static struct { struct dss_lcd_mgr_config mgr_config; struct omap_video_timings timings; int datapairs; + + struct omap_dss_output output; } sdi; static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) @@ -255,8 +257,28 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev) } } +static void __init sdi_init_output(struct platform_device *pdev) +{ + struct omap_dss_output *out = &sdi.output; + + out->pdev = pdev; + out->id = OMAP_DSS_OUTPUT_SDI; + out->type = OMAP_DISPLAY_TYPE_SDI; + + dss_register_output(out); +} + +static void __exit sdi_uninit_output(struct platform_device *pdev) +{ + struct omap_dss_output *out = &sdi.output; + + dss_unregister_output(out); +} + static int __init omap_sdi_probe(struct platform_device *pdev) { + sdi_init_output(pdev); + sdi_probe_pdata(pdev); return 0; @@ -266,6 +288,8 @@ static int __exit omap_sdi_remove(struct platform_device *pdev) { dss_unregister_child_devices(&pdev->dev); + sdi_uninit_output(pdev); + return 0; } |