Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (6217): V4L: Int if: Add BT.656 interface support

This patch adds BT.656 interface settings for [gs]_ifparm.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Sakari Ailus and committed by
Mauro Carvalho Chehab
08256ea0 098c645e

+50
+50
include/media/v4l2-int-device.h
··· 99 99 100 100 /* Slave interface type. */ 101 101 enum v4l2_if_type { 102 + /* 103 + * Parallel 8-, 10- or 12-bit interface, used by for example 104 + * on certain image sensors. 105 + */ 106 + V4L2_IF_TYPE_BT656, 107 + }; 108 + 109 + enum v4l2_if_type_bt656_mode { 110 + /* 111 + * Modes without Bt synchronisation codes. Separate 112 + * synchronisation signal lines are used. 113 + */ 114 + V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT, 115 + V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT, 116 + V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT, 117 + /* 118 + * Use Bt synchronisation codes. The vertical and horizontal 119 + * synchronisation is done based on synchronisation codes. 120 + */ 121 + V4L2_IF_TYPE_BT656_MODE_BT_8BIT, 122 + V4L2_IF_TYPE_BT656_MODE_BT_10BIT, 123 + }; 124 + 125 + struct v4l2_if_type_bt656 { 126 + /* 127 + * 0: Frame begins when vsync is high. 128 + * 1: Frame begins when vsync changes from low to high. 129 + */ 130 + unsigned frame_start_on_rising_vs:1; 131 + /* Use Bt synchronisation codes for sync correction. */ 132 + unsigned bt_sync_correct:1; 133 + /* Swap every two adjacent image data elements. */ 134 + unsigned swap:1; 135 + /* Inverted latch clock polarity from slave. */ 136 + unsigned latch_clk_inv:1; 137 + /* Hs polarity. 0 is active high, 1 active low. */ 138 + unsigned nobt_hs_inv:1; 139 + /* Vs polarity. 0 is active high, 1 active low. */ 140 + unsigned nobt_vs_inv:1; 141 + enum v4l2_if_type_bt656_mode mode; 142 + /* Minimum accepted bus clock for slave (in Hz). */ 143 + u32 clock_min; 144 + /* Maximum accepted bus clock for slave. */ 145 + u32 clock_max; 146 + /* 147 + * Current wish of the slave. May only change in response to 148 + * ioctls that affect image capture. 149 + */ 150 + u32 clock_curr; 102 151 }; 103 152 104 153 struct v4l2_ifparm { 105 154 enum v4l2_if_type if_type; 106 155 union { 156 + struct v4l2_if_type_bt656 bt656; 107 157 } u; 108 158 }; 109 159