User`s guide

Supporting the i.MX53 Camera Sensor Interface CSI0
i.MX53 System Development User’s Guide, Rev. 1
Freescale Semiconductor 20-5
After the functions have been created, you need to add additional information to ipuv3_csi0_chess_slave
and ipuv3_csi0_chess_int_device. The device uses this information to register as a V4L2 device
The following ioctl function references are included:
static struct v4l2_int_slave ipuv3_csi0_chess_slave = {
.ioctls = ipuv3_csi0_chess_ioctl_desc,
.num_ioctls = ARRAY_SIZE(ipuv3_csi0_chess_ioctl_desc),
};
static struct v4l2_int_device ipuv3_csi0_chess_int_device = {
...
.type = v4l2_int_type_slave,
...
};
static int ipuv3_csi0_chess_probe(struct i2c_client *client,const struct i2c_device_id *id)
{
...
retval = v4l2_int_device_register(&ipuv3_csi0_chess_int_device);
...
}
It is also necessary to modify other files to prepare the BSP for CSI test mode. Change the sensor pixel
format from YUV to RGB565 in the ipu_prp_vf_sdc_bg.c file so that the image converter will not perform
color space conversion and the input received from the CSI test mode generator will be sent directly to the
memory. Also, modify mxc_v4l2_capture.c to preserve CSI test mode settings, which are set by the
ipuv3_csi0_chess_init_mode() function in the ipuv3_csi0_chess.c file.
20.4.3 Adding a Compilation Flag for the New Camera
After camera files have been created and the Kconfig file has the entry for your new camera, modify the
Makefile to create the new camera module during compilation. The Makefile is located in the same folder
as your new camera file and Kconfig:
<ltib dir>/rpm/BUILD/linux/drivers/media/video/mxc/capture.
1. Enter the following into the i.MX53 camera support folder
$ cd <ltib dir>/rpm/BUILD/linux/drivers/media/video/mxc/capture
ioctl_s_ctrl static int ioctl_s_ctrl(struct
v4l2_int_device *s, struct v4l2_control
*vc)
V4L2 sensor interface handler for VIDIOC_S_CTRL. If the
requested control is supported, sets the control's current value in
HW (and updates the video_control[] array). Otherwise, returns
-EINVAL if the control is not supported.
ioctl_init static int ioctl_init(struct v4l2_int_device
*s)
V4L2 sensor interface handler for VIDIOC_INT_INIT. Initialize
sensor interface.
ioctl_dev_init static int ioctl_dev_init(struct
v4l2_int_device *s)
Initialize the device when slave attaches to the master.
ioctl_dev_exit static int ioctl_dev_exit(struct
v4l2_int_device *s)
Deinitialize the device when slave detaches to the master.
Table 20-2. Required Functions (continued)
Function name Function declaration Description