]> Git Repo - linux.git/blobdiff - include/media/v4l2-mediabus.h
Merge branch 'i2c/for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[linux.git] / include / media / v4l2-mediabus.h
index 34cc99e093ef79780fb92f2793a08b044f8713cf..93f8afcb7a22056faa2c2f3d52ca2f495f27f1fd 100644 (file)
  * @V4L2_MBUS_PARALLEL:        parallel interface with hsync and vsync
  * @V4L2_MBUS_BT656:   parallel interface with embedded synchronisation, can
  *                     also be used for BT.1120
+ * @V4L2_MBUS_CSI1:    MIPI CSI-1 serial interface
+ * @V4L2_MBUS_CCP2:    CCP2 (Compact Camera Port 2)
  * @V4L2_MBUS_CSI2:    MIPI CSI-2 serial interface
  */
 enum v4l2_mbus_type {
        V4L2_MBUS_PARALLEL,
        V4L2_MBUS_BT656,
+       V4L2_MBUS_CSI1,
+       V4L2_MBUS_CCP2,
        V4L2_MBUS_CSI2,
 };
 
@@ -113,4 +117,30 @@ static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
        mbus_fmt->code = code;
 }
 
+static inline void v4l2_fill_pix_format_mplane(
+                               struct v4l2_pix_format_mplane *pix_mp_fmt,
+                               const struct v4l2_mbus_framefmt *mbus_fmt)
+{
+       pix_mp_fmt->width = mbus_fmt->width;
+       pix_mp_fmt->height = mbus_fmt->height;
+       pix_mp_fmt->field = mbus_fmt->field;
+       pix_mp_fmt->colorspace = mbus_fmt->colorspace;
+       pix_mp_fmt->ycbcr_enc = mbus_fmt->ycbcr_enc;
+       pix_mp_fmt->quantization = mbus_fmt->quantization;
+       pix_mp_fmt->xfer_func = mbus_fmt->xfer_func;
+}
+
+static inline void v4l2_fill_mbus_format_mplane(
+                               struct v4l2_mbus_framefmt *mbus_fmt,
+                               const struct v4l2_pix_format_mplane *pix_mp_fmt)
+{
+       mbus_fmt->width = pix_mp_fmt->width;
+       mbus_fmt->height = pix_mp_fmt->height;
+       mbus_fmt->field = pix_mp_fmt->field;
+       mbus_fmt->colorspace = pix_mp_fmt->colorspace;
+       mbus_fmt->ycbcr_enc = pix_mp_fmt->ycbcr_enc;
+       mbus_fmt->quantization = pix_mp_fmt->quantization;
+       mbus_fmt->xfer_func = pix_mp_fmt->xfer_func;
+}
+
 #endif
This page took 0.034274 seconds and 4 git commands to generate.