[RFC 03/14] OMAPDSS: Add DT support to DSS, DISPC, DPI
flat view
STALE4958d
From: Tomi Valkeinen <hidden>
Date: 2013-03-27 08:45:10
Also in:
linux-devicetree, linux-omap
Subsystem:
framebuffer layer, the rest · Maintainers:
Helge Deller, Linus Torvalds
Add the code to make DSS, DISPC and DPI drivers work with device tree on OMAP3 and OMAP4. The only change is adding the of_match_tables. Signed-off-by: Tomi Valkeinen <redacted> --- drivers/video/omap2/dss/dispc.c | 7 +++++++ drivers/video/omap2/dss/dpi.c | 8 ++++++++ drivers/video/omap2/dss/dss.c | 7 +++++++ 3 files changed, 22 insertions(+)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 8cfa27b..be53d64 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c@@ -3705,12 +3705,19 @@ static const struct dev_pm_ops dispc_pm_ops = { .runtime_resume = dispc_runtime_resume, }; +static const struct of_device_id dispc_of_match[] = { + { .compatible = "ti,omap3-dispc", }, + { .compatible = "ti,omap4-dispc", }, + {}, +}; + static struct platform_driver omap_dispchw_driver = { .remove = __exit_p(omap_dispchw_remove), .driver = { .name = "omapdss_dispc", .owner = THIS_MODULE, .pm = &dispc_pm_ops, + .of_match_table = dispc_of_match, }, };
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index e7beea2..dc7e324 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c@@ -30,6 +30,7 @@ #include <linux/platform_device.h> #include <linux/regulator/consumer.h> #include <linux/string.h> +#include <linux/of.h> #include <video/omapdss.h>
@@ -765,11 +766,18 @@ static int __exit omap_dpi_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id dpi_of_match[] = { + { .compatible = "ti,omap3-dpi", }, + { .compatible = "ti,omap4-dpi", }, + {}, +}; + static struct platform_driver omap_dpi_driver = { .remove = __exit_p(omap_dpi_remove), .driver = { .name = "omapdss_dpi", .owner = THIS_MODULE, + .of_match_table = dpi_of_match, }, };
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 62db201..dc721f4 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c@@ -962,12 +962,19 @@ static const struct dev_pm_ops dss_pm_ops = { .runtime_resume = dss_runtime_resume, }; +static const struct of_device_id dss_of_match[] = { + { .compatible = "ti,omap3-dss", }, + { .compatible = "ti,omap4-dss", }, + {}, +}; + static struct platform_driver omap_dsshw_driver = { .remove = __exit_p(omap_dsshw_remove), .driver = { .name = "omapdss_dss", .owner = THIS_MODULE, .pm = &dss_pm_ops, + .of_match_table = dss_of_match, }, };
--
1.7.10.4