diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-08-11 01:02:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-24 03:15:05 -0400 |
commit | d1d70aa69db3d09240e9faf6bf68a044b9107480 (patch) | |
tree | 3c3463213751ad8c4e6530030bb403c1af75088b | |
parent | edcaa49a2a8a6854c54a5f400b803c63e68a459c (diff) |
[media] media: OF: add "sync-on-green-active" property
This patch adds 'sync-on-green-active' property as part
of endpoint property.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | Documentation/devicetree/bindings/media/video-interfaces.txt | 2 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-of.c | 4 | ||||
-rw-r--r-- | include/media/v4l2-mediabus.h | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt index e022d2dc4962..ce719f89dd1c 100644 --- a/Documentation/devicetree/bindings/media/video-interfaces.txt +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt | |||
@@ -88,6 +88,8 @@ Optional endpoint properties | |||
88 | - field-even-active: field signal level during the even field data transmission. | 88 | - field-even-active: field signal level during the even field data transmission. |
89 | - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock | 89 | - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock |
90 | signal. | 90 | signal. |
91 | - sync-on-green-active: active state of Sync-on-green (SoG) signal, 0/1 for | ||
92 | LOW/HIGH respectively. | ||
91 | - data-lanes: an array of physical data lane indexes. Position of an entry | 93 | - data-lanes: an array of physical data lane indexes. Position of an entry |
92 | determines the logical lane number, while the value of an entry indicates | 94 | determines the logical lane number, while the value of an entry indicates |
93 | physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have | 95 | physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have |
diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c index ed305d8c65f0..a6478dca0cde 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c | |||
@@ -100,6 +100,10 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node, | |||
100 | if (!of_property_read_u32(node, "data-shift", &v)) | 100 | if (!of_property_read_u32(node, "data-shift", &v)) |
101 | bus->data_shift = v; | 101 | bus->data_shift = v; |
102 | 102 | ||
103 | if (!of_property_read_u32(node, "sync-on-green-active", &v)) | ||
104 | flags |= v ? V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH : | ||
105 | V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW; | ||
106 | |||
103 | bus->flags = flags; | 107 | bus->flags = flags; |
104 | 108 | ||
105 | } | 109 | } |
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 83ae07e53350..395c4a95a42a 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10) | 40 | #define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10) |
41 | /* FIELD = 1/0 - Field1 (odd)/Field2 (even) */ | 41 | /* FIELD = 1/0 - Field1 (odd)/Field2 (even) */ |
42 | #define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11) | 42 | #define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11) |
43 | /* Active state of Sync-on-green (SoG) signal, 0/1 for LOW/HIGH respectively. */ | ||
44 | #define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH (1 << 12) | ||
45 | #define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW (1 << 13) | ||
43 | 46 | ||
44 | /* Serial flags */ | 47 | /* Serial flags */ |
45 | /* How many lanes the client can use */ | 48 | /* How many lanes the client can use */ |