media: OF: add "sync-on-green-active" property
Subsystems (2)
PATCH 1/1 media: OF: add "sync-on-green-active" property
From: "Lad, Prabhakar" <[email protected]>
This patch adds 'sync-on-green-active' property as part of endpoint property.
Signed-off-by Lad, Prabhakar <[email protected]>
---
Changes for non RFC:
1: Fixed review comments pointed by Hans.
2: Added Ack from Sylwester.
Changes for v5:
1: Changed description for sync-on-green-active property in
documentation file as suggested by Sylwester.
Changes for v4:
1: Fixed review comments pointed by Sylwester.
Changes for v3:
1: Fixed review comments pointed by Laurent and Sylwester.
RFC v2 https://patchwork.kernel.org/patch/2578091/
RFC V1 https://patchwork.kernel.org/patch/2572341/
.../devicetree/bindings/media/video-interfaces.txt | 2 ++ drivers/media/v4l2-core/v4l2-of.c | 4 ++++ include/media/v4l2-mediabus.h | 3 +++ 3 files changed, 9 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +2 -0
@@ -88,6 +88,8 @@ Optional endpoint properties - field-even-active: field signal level during the even field data transmission. - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock signal. +- sync-on-green-active: active state of Sync-on-green (SoG) signal, 0/1 for + LOW/HIGH respectively. - data-lanes: an array of physical data lane indexes. Position of an entry determines the logical lane number, while the value of an entry indicates physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have
drivers/media/v4l2-core/v4l2-of.c +4 -0
@@ -100,6 +100,10 @@ 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_property_read_u32 (node,"sync-on-green-active" , &v)) + flags |= v ?V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH : +V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW ; + bus->flags = flags; }
include/media/v4l2-mediabus.h +3 -0
@@ -40,6 +40,9 @@#define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10)/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */ #define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11) +/* Active state of Sync-on-green (SoG) signal, 0/1 for LOW/HIGH respectively. */ +#define V4L2_MBUS_VIDEO_SOG_ACTIVE_HIGH (1 << 12) +#define V4L2_MBUS_VIDEO_SOG_ACTIVE_LOW (1 << 13)/* Serial flags */ /* How many lanes the client can use */
Signature · 1 line
1.7.9.5