[PATCH RFC v2] media: OF: add sync-on-green endpoint property

Lad Prabhakar prabhakar.csengg at gmail.com
Thu May 16 23:18:07 EST 2013


From: Lad, Prabhakar <prabhakar.csengg at gmail.com>

This patch adds "sync-on-green" property as part of
endpoint properties and also support to parse them in the parser.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg at gmail.com>
Cc: Hans Verkuil <hans.verkuil at cisco.com>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab at redhat.com>
Cc: Guennadi Liakhovetski <g.liakhovetski at gmx.de>
Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
Cc: Sakari Ailus <sakari.ailus at iki.fi>
Cc: Grant Likely <grant.likely at secretlab.ca>
Cc: Rob Herring <rob.herring at calxeda.com>
Cc: Rob Landley <rob at landley.net>
Cc: devicetree-discuss at lists.ozlabs.org
Cc: linux-doc at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: Kyungmin Park <kyungmin.park at samsung.com>
---
 Changes for v2:
 1: Dropped "field-active" property as it same as existing
    "field-even-active" property.

 .../devicetree/bindings/media/video-interfaces.txt |    2 ++
 drivers/media/v4l2-core/v4l2-of.c                  |    3 +++
 include/media/v4l2-mediabus.h                      |    1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt
index e022d2d..f91821f 100644
--- a/Documentation/devicetree/bindings/media/video-interfaces.txt
+++ b/Documentation/devicetree/bindings/media/video-interfaces.txt
@@ -101,6 +101,8 @@ Optional endpoint properties
   array contains only one entry.
 - clock-noncontinuous: a boolean property to allow MIPI CSI-2 non-continuous
   clock mode.
+-sync-on-green: a boolean property indicating to sync with the green signal in
+ RGB.
 
 
 Example
diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c
index aa59639..b51d61f 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -100,6 +100,9 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node,
 	if (!of_property_read_u32(node, "data-shift", &v))
 		bus->data_shift = v;
 
+	if (of_get_property(node, "sync-on-green", &v))
+		flags |= V4L2_MBUS_SYNC_ON_GREEN;
+
 	bus->flags = flags;
 
 }
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 83ae07e..cf2c66f9 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -40,6 +40,7 @@
 #define V4L2_MBUS_FIELD_EVEN_HIGH		(1 << 10)
 /* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
 #define V4L2_MBUS_FIELD_EVEN_LOW		(1 << 11)
+#define V4L2_MBUS_SYNC_ON_GREEN			(1 << 12)
 
 /* Serial flags */
 /* How many lanes the client can use */
-- 
1.7.4.1



More information about the devicetree-discuss mailing list