Thread (3 messages) 3 messages, 2 authors, 2013-05-29

Re: [PATCH v5] media: i2c: tvp514x: add OF support

From: Prabhakar Lad <prabhakar.csengg@gmail.com>
Date: 2013-05-29 04:19:27
Also in: linux-media, lkml

Hi Laurent,

On Wed, May 29, 2013 at 6:52 AM, Laurent Pinchart
[off-list ref] wrote:
Hi Prabhakar,

Thanks for the patch.

On Sunday 26 May 2013 18:49:46 Prabhakar Lad wrote:
quoted
From: Lad, Prabhakar <prabhakar.csengg@gmail.com>

add OF support for the tvp514x driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <redacted>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <redacted>
Cc: Guennadi Liakhovetski <redacted>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Grant Likely <redacted>
Cc: Rob Herring <redacted>
Cc: Rob Landley <redacted>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: davinci-linux-open-source@linux.davincidsp.com
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Thanks for the ack.
(with two small comment below).
quoted
---
Tested on da850-evm.
[snip]
s/of port/on port/
s/refer/refer to/
OK
quoted
Documentation/devicetree/bindings/media/video-interfaces.txt.
+
+Example:
+
+     i2c0@1c22000 {
+             ...
+             ...
+             tvp514x@5c {
+                     compatible = "ti,tvp5146";
+                     reg = <0x5c>;
+
+                     port {
+                             tvp514x_1: endpoint {
+                                     hsync-active = <1>;
+                                     vsync-active = <1>;
+                                     pclk-sample = <0>;
+                             };
+                     };
+             };
+             ...
+     };
diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
index 7438e01..7ed999b 100644
--- a/drivers/media/i2c/tvp514x.c
+++ b/drivers/media/i2c/tvp514x.c
@@ -39,6 +39,7 @@
 #include <media/v4l2-device.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-mediabus.h>
+#include <media/v4l2-of.h>
 #include <media/v4l2-chip-ident.h>
 #include <media/v4l2-ctrls.h>
 #include <media/tvp514x.h>
@@ -1055,6 +1056,42 @@ static struct tvp514x_decoder tvp514x_dev = {

 };

+static struct tvp514x_platform_data *
+tvp514x_get_pdata(struct i2c_client *client)
+{
+     struct tvp514x_platform_data *pdata = NULL;
No need to initialize pdata to NULL.
OK will fix it in the next version.

Regards,
--Prabhakar Lad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help