[PATCH v2 0/2] [media] s5p-tv: Add initial DT-support to s5p-tv's subdevices

STALE5277d

7 messages, 2 authors, 2012-03-25 · open the first message on its own page

[PATCH v2 0/2] [media] s5p-tv: Add initial DT-support to s5p-tv's subdevices

From: Karol Lewandowski <hidden>
Date: 2012-03-16 15:42:21

Changes since v1:
 - dropped patch for sii9234 driver - driver itself hasn't been merged yet
 - changed compatible string to name first known SoC having given features
   (IP blocks, actually) [Thanks Thomas!]


This patchset adds initial device tree support to drivers used by
s5p-tv on Exynos4.

DT support for s5p-tv driver itself would benefit from changes to v4l
core (missing OF helper functions) and thus, will be sent later in
separate patchset.

Karol Lewandowski (2):
  s5p-tv: Add initial DT-support for TV mixer
  s5p-tv: Add initial DT-support for HDMIPHY

 drivers/media/video/s5p-tv/hdmiphy_drv.c |   10 ++++++++++
 drivers/media/video/s5p-tv/mixer_drv.c   |    9 +++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

-- 
1.7.9

[PATCH 1/2] s5p-tv: Add initial DT-support for TV mixer

From: Karol Lewandowski <hidden>
Date: 2012-03-16 15:42:33

Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/video/s5p-tv/mixer_drv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/mixer_drv.c b/drivers/media/video/s5p-tv/mixer_drv.c
index 0064309..2eb48ea 100644
--- a/drivers/media/video/s5p-tv/mixer_drv.c
+++ b/drivers/media/video/s5p-tv/mixer_drv.c
@@ -448,6 +448,14 @@ static int __devexit mxr_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id mxr_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-tvmixer" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, mxr_dt_match);
+#endif
+
 static struct platform_driver mxr_driver __refdata = {
 	.probe = mxr_probe,
 	.remove = __devexit_p(mxr_remove),
@@ -455,6 +463,7 @@ static struct platform_driver mxr_driver __refdata = {
 		.name = MXR_DRIVER_NAME,
 		.owner = THIS_MODULE,
 		.pm = &mxr_pm_ops,
+		.of_match_table = of_match_ptr(mxr_dt_match),
 	}
 };
 
-- 
1.7.9

[PATCH 2/2] s5p-tv: Add initial DT-support for HDMIPHY

From: Karol Lewandowski <hidden>
Date: 2012-03-16 15:42:34

Make it possible to instantiate driver from device tree description.

Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Abraham <redacted>
---
 drivers/media/video/s5p-tv/hdmiphy_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/hdmiphy_drv.c b/drivers/media/video/s5p-tv/hdmiphy_drv.c
index 6693f4a..ddf3008 100644
--- a/drivers/media/video/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/video/s5p-tv/hdmiphy_drv.c
@@ -18,6 +18,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <media/v4l2-subdev.h>
 
@@ -165,10 +166,19 @@ static const struct i2c_device_id hdmiphy_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id hdmiphy_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-hdmiphy" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, hdmiphy_dt_match);
+#endif
+
 static struct i2c_driver hdmiphy_driver = {
 	.driver = {
 		.name	= "s5p-hdmiphy",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(hdmiphy_dt_match),
 	},
 	.probe		= hdmiphy_probe,
 	.remove		= __devexit_p(hdmiphy_remove),
-- 
1.7.9

Re: [PATCH 1/2] s5p-tv: Add initial DT-support for TV mixer

From: Grant Likely <hidden>
Date: 2012-03-18 18:24:31

On Fri, 16 Mar 2012 16:42:11 +0100, Karol Lewandowski [off-list ref] wrote:
quoted hunk
Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/video/s5p-tv/mixer_drv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/mixer_drv.c b/drivers/media/video/s5p-tv/mixer_drv.c
index 0064309..2eb48ea 100644
--- a/drivers/media/video/s5p-tv/mixer_drv.c
+++ b/drivers/media/video/s5p-tv/mixer_drv.c
@@ -448,6 +448,14 @@ static int __devexit mxr_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id mxr_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-tvmixer" },
Need to add this new compatible string to
Documentation/devicetree/bindings.

Otherwise looks good.

g.
quoted hunk
+	{ },
+};
+MODULE_DEVICE_TABLE(of, mxr_dt_match);
+#endif
+
 static struct platform_driver mxr_driver __refdata = {
 	.probe = mxr_probe,
 	.remove = __devexit_p(mxr_remove),
@@ -455,6 +463,7 @@ static struct platform_driver mxr_driver __refdata = {
 		.name = MXR_DRIVER_NAME,
 		.owner = THIS_MODULE,
 		.pm = &mxr_pm_ops,
+		.of_match_table = of_match_ptr(mxr_dt_match),
 	}
 };
 
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

Re: [PATCH 2/2] s5p-tv: Add initial DT-support for HDMIPHY

From: Grant Likely <hidden>
Date: 2012-03-18 18:25:04

On Fri, 16 Mar 2012 16:42:12 +0100, Karol Lewandowski [off-list ref] wrote:
quoted hunk
Make it possible to instantiate driver from device tree description.

Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Abraham <redacted>
---
 drivers/media/video/s5p-tv/hdmiphy_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/hdmiphy_drv.c b/drivers/media/video/s5p-tv/hdmiphy_drv.c
index 6693f4a..ddf3008 100644
--- a/drivers/media/video/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/video/s5p-tv/hdmiphy_drv.c
@@ -18,6 +18,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <media/v4l2-subdev.h>
 
@@ -165,10 +166,19 @@ static const struct i2c_device_id hdmiphy_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id hdmiphy_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-hdmiphy" },
Ditto here; needs to be listed in documentation.

g.
+	{ },
+};
+MODULE_DEVICE_TABLE(of, hdmiphy_dt_match);
+#endif
+
 static struct i2c_driver hdmiphy_driver = {
 	.driver = {
 		.name	= "s5p-hdmiphy",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(hdmiphy_dt_match),
 	},
 	.probe		= hdmiphy_probe,
 	.remove		= __devexit_p(hdmiphy_remove),
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.

Re: [PATCH 2/2] s5p-tv: Add initial DT-support for HDMIPHY

From: Karol Lewandowski <hidden>
Date: 2012-03-23 11:28:52

On 18.03.2012 19:24, Grant Likely wrote:
On Fri, 16 Mar 2012 16:42:12 +0100, Karol Lewandowski [off-list ref] wrote:
quoted
Make it possible to instantiate driver from device tree description.

Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Abraham <redacted>
---
 drivers/media/video/s5p-tv/hdmiphy_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/hdmiphy_drv.c b/drivers/media/video/s5p-tv/hdmiphy_drv.c
index 6693f4a..ddf3008 100644
--- a/drivers/media/video/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/video/s5p-tv/hdmiphy_drv.c
@@ -18,6 +18,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <media/v4l2-subdev.h>
 
@@ -165,10 +166,19 @@ static const struct i2c_device_id hdmiphy_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id hdmiphy_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-hdmiphy" },
Ditto here; needs to be listed in documentation.

As these drivers require only irq and io address may add these to
something like [bindings/arm/samsung/]trivial-devices.txt (like it's
done for i2c)?

Thanks for review!
-- 
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform

Re: [PATCH 2/2] s5p-tv: Add initial DT-support for HDMIPHY

From: Grant Likely <hidden>
Date: 2012-03-25 00:31:38

On Fri, 23 Mar 2012 12:28:52 +0100, Karol Lewandowski [off-list ref] wrote:
On 18.03.2012 19:24, Grant Likely wrote:
quoted
On Fri, 16 Mar 2012 16:42:12 +0100, Karol Lewandowski [off-list ref] wrote:
quoted
Make it possible to instantiate driver from device tree description.

Signed-off-by: Karol Lewandowski <redacted>
Signed-off-by: Kyungmin Park <redacted>
Reviewed-by: Thomas Abraham <redacted>
---
 drivers/media/video/s5p-tv/hdmiphy_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/s5p-tv/hdmiphy_drv.c b/drivers/media/video/s5p-tv/hdmiphy_drv.c
index 6693f4a..ddf3008 100644
--- a/drivers/media/video/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/video/s5p-tv/hdmiphy_drv.c
@@ -18,6 +18,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/err.h>
+#include <linux/of.h>
 
 #include <media/v4l2-subdev.h>
 
@@ -165,10 +166,19 @@ static const struct i2c_device_id hdmiphy_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 
+#ifdef CONFIG_OF
+static struct of_device_id hdmiphy_dt_match[] = {
+	{ .compatible = "samsung,s5pv210-hdmiphy" },
Ditto here; needs to be listed in documentation.

As these drivers require only irq and io address may add these to
something like [bindings/arm/samsung/]trivial-devices.txt (like it's
done for i2c)?
yes.  I just want the values in the documentation where they can be
searched for.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help