summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-02-20 16:57:37 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 14:44:51 +0300
commita57dd4fe7bef557afaa1a6cdb77cd95b2cba094e (patch)
tree50cae3f775bc743299dc7285c758df599d2874cc /drivers/video/omap2/dss/dpi.c
parent53f576a8dc5729e719c862aba2ed3430867bd5cb (diff)
OMAPDSS: create DPI & SDI drivers
We currently have separate device/driver for each DSS HW module. The DPI and SDI outputs are more or less parts of the DSS or DISPC hardware modules, but in SW it makes sense to represent them as device/driver pairs similarly to all the other outputs. This also makes sense for device tree, as each node under dss will be a platform device, and handling DPI & SDI somehow differently than the rest would just make the code more complex. This patch modifies the dpi.c and sdi.c to create drivers for the platform devices. 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.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index d6e8fe776152..79d242a42607 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -379,12 +379,31 @@ int dpi_init_display(struct omap_dss_device *dssdev)
return 0;
}
-int dpi_init(void)
+static int omap_dpi_probe(struct platform_device *pdev)
{
return 0;
}
-void dpi_exit(void)
+static int omap_dpi_remove(struct platform_device *pdev)
{
+ return 0;
}
+static struct platform_driver omap_dpi_driver = {
+ .probe = omap_dpi_probe,
+ .remove = omap_dpi_remove,
+ .driver = {
+ .name = "omapdss_dpi",
+ .owner = THIS_MODULE,
+ },
+};
+
+int dpi_init_platform_driver(void)
+{
+ return platform_driver_register(&omap_dpi_driver);
+}
+
+void dpi_uninit_platform_driver(void)
+{
+ platform_driver_unregister(&omap_dpi_driver);
+}