From: Sebastian Reichel <sre@debian.org>
To: "Sebastian Reichel" <sre@ring0.de>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
"Benoît Cousson" <bcousson@baylibre.com>,
"Tony Lindgren" <tony@atomide.com>
Cc: Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Rob Landley <rob@landley.net>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
devicetree@vger.kernel.org, Sebastian Reichel <sre@debian.org>
Subject: [PATCH 1/4] OMAPDSS: Add DT support to SDI
Date: Fri, 13 Dec 2013 18:17:27 +0000 [thread overview]
Message-ID: <1386958650-2404-2-git-send-email-sre@debian.org> (raw)
In-Reply-To: <1386958650-2404-1-git-send-email-sre@debian.org>
Add the code to make the SDI driver work with device tree on OMAP3.
Signed-off-by: Sebastian Reichel <sre@debian.org>
---
drivers/video/omap2/dss/sdi.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index ccc569a..bdc6a68 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -26,6 +26,8 @@
#include <linux/export.h>
#include <linux/platform_device.h>
#include <linux/string.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
#include <video/omapdss.h>
#include "dss.h"
@@ -333,6 +335,9 @@ static const struct omapdss_sdi_ops sdi_ops = {
static void sdi_init_output(struct platform_device *pdev)
{
+ struct device_node *node = pdev->dev.of_node;
+ struct device_node *ep;
+
struct omap_dss_device *out = &sdi.output;
out->dev = &pdev->dev;
@@ -344,6 +349,15 @@ static void sdi_init_output(struct platform_device *pdev)
out->owner = THIS_MODULE;
omapdss_register_output(out);
+
+ if (!pdev->dev.of_node)
+ return;
+
+ ep = omapdss_of_get_first_endpoint(node);
+ if (!ep)
+ return;
+
+ of_property_read_u32(ep, "data-lines", &sdi.datapairs);
}
static void __exit sdi_uninit_output(struct platform_device *pdev)
@@ -369,12 +383,18 @@ static int __exit omap_sdi_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id sdi_of_match[] = {
+ { .compatible = "ti,omap3-sdi" },
+ {},
+};
+
static struct platform_driver omap_sdi_driver = {
.probe = omap_sdi_probe,
.remove = __exit_p(omap_sdi_remove),
.driver = {
.name = "omapdss_sdi",
.owner = THIS_MODULE,
+ .of_match_table = sdi_of_match,
},
};
--
1.8.5.1
next prev parent reply other threads:[~2013-12-13 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 18:17 [PATCH 0/4] OMAPDSS: DT support for N900 panel Sebastian Reichel
2013-12-13 18:17 ` Sebastian Reichel [this message]
2013-12-13 18:17 ` [PATCH 2/4] OMAPDSS: ACX565AKM: Add DT support Sebastian Reichel
2013-12-13 18:17 ` [PATCH 3/4] ARM: OMAP: rx51: DT boot: disable legacy dss init Sebastian Reichel
2013-12-13 18:17 ` [PATCH 4/4] ARM: dts: omap3-n900: Add display support Sebastian Reichel
2013-12-17 7:37 ` [PATCH 0/4] OMAPDSS: DT support for N900 panel Tomi Valkeinen
2013-12-17 17:14 ` Sebastian Reichel
2013-12-17 17:29 ` Tomi Valkeinen
2013-12-18 21:55 ` Sebastian Reichel
2013-12-19 0:51 ` Sebastian Reichel
2013-12-19 5:30 ` Tomi Valkeinen
2013-12-19 10:08 ` Sebastian Reichel
[not found] ` <20131219100840.GA923-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
2013-12-19 13:56 ` Sebastian Reichel
2013-12-19 16:42 ` Tony Lindgren
2013-12-19 17:00 ` Sebastian Reichel
2013-12-19 18:34 ` Tony Lindgren
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=1386958650-2404-2-git-send-email-sre@debian.org \
--to=sre@debian.org \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sre@ring0.de \
--cc=swarren@wwwdotorg.org \
--cc=tomi.valkeinen@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).