diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-20 16:57:37 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-05-11 14:44:51 +0300 |
commit | a57dd4fe7bef557afaa1a6cdb77cd95b2cba094e (patch) | |
tree | 50cae3f775bc743299dc7285c758df599d2874cc /drivers/video/omap2/dss/sdi.c | |
parent | 53f576a8dc5729e719c862aba2ed3430867bd5cb (diff) | |
download | op-kernel-dev-a57dd4fe7bef557afaa1a6cdb77cd95b2cba094e.zip op-kernel-dev-a57dd4fe7bef557afaa1a6cdb77cd95b2cba094e.tar.gz |
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.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 67fbe7c..4ae2d8f 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -24,6 +24,7 @@ #include <linux/err.h> #include <linux/regulator/consumer.h> #include <linux/export.h> +#include <linux/platform_device.h> #include <video/omapdss.h> #include "dss.h" @@ -182,11 +183,31 @@ int sdi_init_display(struct omap_dss_device *dssdev) return 0; } -int sdi_init(void) +static int omap_sdi_probe(struct platform_device *pdev) { return 0; } -void sdi_exit(void) +static int omap_sdi_remove(struct platform_device *pdev) { + return 0; +} + +static struct platform_driver omap_sdi_driver = { + .probe = omap_sdi_probe, + .remove = omap_sdi_remove, + .driver = { + .name = "omapdss_sdi", + .owner = THIS_MODULE, + }, +}; + +int sdi_init_platform_driver(void) +{ + return platform_driver_register(&omap_sdi_driver); +} + +void sdi_uninit_platform_driver(void) +{ + platform_driver_unregister(&omap_sdi_driver); } |