Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / include / media / v4l2-mediabus.h
index 0dbe02a..865cda7 100644 (file)
@@ -40,6 +40,7 @@ enum v4l2_mbus_pixelcode {
        V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE,
        V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE,
        V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE,
+       V4L2_MBUS_FMT_SGRBG8_1X8,
 };
 
 /**
@@ -58,4 +59,24 @@ struct v4l2_mbus_framefmt {
        enum v4l2_colorspace            colorspace;
 };
 
+static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
+                               const struct v4l2_mbus_framefmt *mbus_fmt)
+{
+       pix_fmt->width = mbus_fmt->width;
+       pix_fmt->height = mbus_fmt->height;
+       pix_fmt->field = mbus_fmt->field;
+       pix_fmt->colorspace = mbus_fmt->colorspace;
+}
+
+static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
+                          const struct v4l2_pix_format *pix_fmt,
+                          enum v4l2_mbus_pixelcode code)
+{
+       mbus_fmt->width = pix_fmt->width;
+       mbus_fmt->height = pix_fmt->height;
+       mbus_fmt->field = pix_fmt->field;
+       mbus_fmt->colorspace = pix_fmt->colorspace;
+       mbus_fmt->code = code;
+}
+
 #endif