aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/sdi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-02-20 09:57:37 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 07:44:51 -0400
commita57dd4fe7bef557afaa1a6cdb77cd95b2cba094e (patch)
tree50cae3f775bc743299dc7285c758df599d2874cc /drivers/video/omap2/dss/sdi.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/sdi.c')
-rw-r--r--drivers/video/omap2/dss/sdi.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 67fbe7cee41..4ae2d8f5504 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -24,6 +24,7 @@
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/regulator/consumer.h> 25#include <linux/regulator/consumer.h>
26#include <linux/export.h> 26#include <linux/export.h>
27#include <linux/platform_device.h>
27 28
28#include <video/omapdss.h> 29#include <video/omapdss.h>
29#include "dss.h" 30#include "dss.h"
@@ -182,11 +183,31 @@ int sdi_init_display(struct omap_dss_device *dssdev)
182 return 0; 183 return 0;
183} 184}
184 185
185int sdi_init(void) 186static int omap_sdi_probe(struct platform_device *pdev)
186{ 187{
187 return 0; 188 return 0;
188} 189}
189 190
190void sdi_exit(void) 191static int omap_sdi_remove(struct platform_device *pdev)
191{ 192{
193 return 0;
194}
195
196static struct platform_driver omap_sdi_driver = {
197 .probe = omap_sdi_probe,
198 .remove = omap_sdi_remove,
199 .driver = {
200 .name = "omapdss_sdi",
201 .owner = THIS_MODULE,
202 },
203};
204
205int sdi_init_platform_driver(void)
206{
207 return platform_driver_register(&omap_sdi_driver);
208}
209
210void sdi_uninit_platform_driver(void)
211{
212 platform_driver_unregister(&omap_sdi_driver);
192} 213}