linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Cc: Archit Taneja <archit@ti.com>, Andy Gross <andy.gross@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	Benoit Cousson <b-cousson@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [RFC 03/14] OMAPDSS: Add DT support to DSS, DISPC, DPI
Date: Wed, 27 Mar 2013 08:45:10 +0000	[thread overview]
Message-ID: <1364373921-7599-4-git-send-email-tomi.valkeinen@ti.com> (raw)
In-Reply-To: <1364373921-7599-1-git-send-email-tomi.valkeinen@ti.com>

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 <tomi.valkeinen@ti.com>
---
 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


  parent reply	other threads:[~2013-03-27  8:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27  8:45 [RFC 00/14] Add DT support to OMAPDSS Tomi Valkeinen
2013-03-27  8:45 ` [RFC 01/14] ARM: OMAP: remove DSS DT hack Tomi Valkeinen
2013-03-27  8:45 ` [RFC 02/14] ARM: OMAP2+: add omapdss_init_of() Tomi Valkeinen
2013-03-27  9:28   ` Benoit Cousson
2013-03-27 10:09     ` Tomi Valkeinen
2013-03-27  8:45 ` Tomi Valkeinen [this message]
2013-03-27  8:45 ` [RFC 04/14] OMAPDSS: Add DT support to DSI Tomi Valkeinen
2013-03-27  8:45 ` [RFC 05/14] OMAPDSS: Add DT support to HDMI Tomi Valkeinen
2013-03-27  8:45 ` [RFC 06/14] OMAPDSS: Taal: Add DT support Tomi Valkeinen
2013-03-27  8:45 ` [RFC 07/14] OMAPDSS: TFP410: " Tomi Valkeinen
     [not found] ` <1364373921-7599-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2013-03-27  8:45   ` [RFC 08/14] OMAPDSS: panel-generic-dpi: add " Tomi Valkeinen
2013-03-27  8:45   ` [RFC 09/14] ARM: omap3.dtsi: add omapdss information Tomi Valkeinen
2013-03-27  8:45   ` [RFC 10/14] ARM: omap4.dtsi: " Tomi Valkeinen
2013-03-27  8:45   ` [RFC 13/14] ARM: omap3-tobi.dts: add lcd (TEST) Tomi Valkeinen
2013-03-27  8:45   ` [RFC 14/14] ARM: omap3-beagle.dts: add TFP410 Tomi Valkeinen
2013-03-27  8:45 ` [RFC 11/14] ARM: omap4-panda.dts: add display information Tomi Valkeinen
2013-03-27  8:45 ` [RFC 12/14] ARM: omap4-sdp.dts: " Tomi Valkeinen
2013-03-27  9:30 ` [RFC 00/14] Add DT support to OMAPDSS Benoit Cousson
2013-03-27 10:15   ` Tomi Valkeinen
2013-03-27  9:41 ` Benoit Cousson
2013-03-27 10:39   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364373921-7599-4-git-send-email-tomi.valkeinen@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=andy.gross@ti.com \
    --cc=archit@ti.com \
    --cc=b-cousson@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).