RE: [PATCH v2] media: imx208: Add imx208 camera sensor driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomasz,

>-----Original Message-----
> +/* Get bayer order based on flip setting. */ static __u32 
> +imx208_get_format_code(struct imx208 *imx208)

>Why not just "u32"?

Its return value will be assigned to the variable code which belongs to the structure 
v4l2_subdev_mbus_code_enum, and the type of this variable is __u32.
struct v4l2_subdev_mbus_code_enum {
	__u32 pad;
	__u32 index;
	__u32 code;
	__u32 which;
	__u32 reserved[8];
};

> +{
> +       /*
> +        * Only one bayer order is supported.
> +        * It depends on the flip settings.
> +        */
> +       static const __u32 codes[2][2] = {

>Ditto.

> +               { MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SGRBG10_1X10, },
> +               { MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SBGGR10_1X10, },
> +       };
> +
> +       return codes[imx208->vflip->val][imx208->hflip->val];
> +}
> +




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux