Video For Linux 2 capture driver. More...
Functions | |
static int | csi_v4l2_master_attach (struct v4l2_int_device *slave) |
static void | csi_v4l2_master_detach (struct v4l2_int_device *slave) |
static u8 | camera_power (cam_data *cam, bool cameraOn) |
static void | camera_callback (u32 mask, void *dev) |
static int | csi_cap_image (cam_data *cam) |
static int | csi_free_frame_buf (cam_data *cam) |
static int | csi_allocate_frame_buf (cam_data *cam, int count) |
static void | csi_free_frames (cam_data *cam) |
static int | csi_v4l2_buffer_status (cam_data *cam, struct v4l2_buffer *buf) |
static int | valid_mode (u32 palette) |
static int | csi_streamon (cam_data *cam) |
static int | csi_streamoff (cam_data *cam) |
static int | start_preview (cam_data *cam) |
static int | stop_preview (cam_data *cam) |
static int | csi_v4l2_g_fmt (cam_data *cam, struct v4l2_format *f) |
static int | csi_v4l2_s_fmt (cam_data *cam, struct v4l2_format *f) |
static int | csi_v4l2_s_param (cam_data *cam, struct v4l2_streamparm *parm) |
static int | csi_v4l_dqueue (cam_data *cam, struct v4l2_buffer *buf) |
static int | csi_v4l_open (struct file *file) |
static int | csi_v4l_close (struct file *file) |
static long | csi_v4l_do_ioctl (struct file *file, unsigned int ioctlnr, void *arg) |
static int | csi_mmap (struct file *file, struct vm_area_struct *vma) |
static void | init_camera_struct (cam_data *cam) |
static int | csi_v4l2_suspend (struct platform_device *pdev, pm_message_t state) |
static int | csi_v4l2_resume (struct platform_device *pdev) |
static __init int | camera_init (void) |
static void __exit | camera_exit (void) |
Variables | |
static struct v4l2_int_master | csi_v4l2_master |
static struct v4l2_file_operations | csi_v4l_fops |
static struct platform_driver | csi_v4l2_driver |
Video For Linux 2 capture driver.
This file is derived from mxc_v4l2_capture.c
static void camera_callback | ( | u32 | mask, | |
void * | dev | |||
) | [static] |
Camera V4l2 callback function.
mask | u32 | |
dev | void device structure |
Referenced by init_camera_struct().
static void __exit camera_exit | ( | void | ) | [static] |
Exit and cleanup for the V4L2
static __init int camera_init | ( | void | ) | [static] |
Entry point for the V4L2
static u8 camera_power | ( | cam_data * | cam, | |
bool | cameraOn | |||
) | [static] |
camera_power function Turns Sensor power On/Off
cam | cam data struct | |
cameraOn | true to turn camera on, false to turn off power. |
References csi_enable_mclk().
Referenced by csi_v4l2_resume(), and csi_v4l2_suspend().
static int csi_allocate_frame_buf | ( | cam_data * | cam, | |
int | count | |||
) | [static] |
Allocate frame buffers
cam | Structure cam_data * | |
count | int number of buffer need to allocated |
References csi_free_frame_buf().
Referenced by csi_v4l_do_ioctl().
static int csi_cap_image | ( | cam_data * | cam | ) | [static] |
Make csi ready for capture image.
cam | structure cam_data * |
Referenced by csi_streamon().
static int csi_free_frame_buf | ( | cam_data * | cam | ) | [static] |
Free frame buffers
cam | Structure cam_data * |
Referenced by csi_allocate_frame_buf(), csi_streamoff(), and csi_v4l_do_ioctl().
static void csi_free_frames | ( | cam_data * | cam | ) | [static] |
Free frame buffers status
cam | Structure cam_data * |
Referenced by csi_streamoff().
static int csi_mmap | ( | struct file * | file, | |
struct vm_area_struct * | vma | |||
) | [static] |
V4L interface - mmap function
file | structure file * | |
vma | structure vm_area_struct * |
static int csi_streamoff | ( | cam_data * | cam | ) | [static] |
Stop stream I/O
cam | structure cam_data * |
References csi_free_frame_buf(), and csi_free_frames().
Referenced by csi_v4l_do_ioctl().
static int csi_streamon | ( | cam_data * | cam | ) | [static] |
Start stream I/O
cam | structure cam_data * |
References csi_cap_image().
Referenced by csi_v4l_do_ioctl().
static int csi_v4l2_buffer_status | ( | cam_data * | cam, | |
struct v4l2_buffer * | buf | |||
) | [static] |
Return the buffer status
cam | Structure cam_data * | |
buf | Structure v4l2_buffer * |
Referenced by csi_v4l_do_ioctl().
static int csi_v4l2_g_fmt | ( | cam_data * | cam, | |
struct v4l2_format * | f | |||
) | [static] |
cam | structure cam_data * | |
f | structure v4l2_format * |
Referenced by csi_v4l_do_ioctl().
static int csi_v4l2_master_attach | ( | struct v4l2_int_device * | slave | ) | [static] |
Initializes the camera driver.
References csi_enable_mclk().
static void csi_v4l2_master_detach | ( | struct v4l2_int_device * | slave | ) | [static] |
Disconnects the camera driver.
static int csi_v4l2_resume | ( | struct platform_device * | pdev | ) | [static] |
This function is called to bring the sensor back from a low power state. Refer to the document driver-model/driver.txt in the kernel source tree for more information.
pdev | the device structure |
References camera_power(), and start_preview().
static int csi_v4l2_s_fmt | ( | cam_data * | cam, | |
struct v4l2_format * | f | |||
) | [static] |
V4L2 - csi_v4l2_s_fmt function
cam | structure cam_data * | |
f | structure v4l2_format * |
References valid_mode().
Referenced by csi_v4l_do_ioctl().
static int csi_v4l2_s_param | ( | cam_data * | cam, | |
struct v4l2_streamparm * | parm | |||
) | [static] |
V4L2 - csi_v4l2_s_param function Allows setting of capturemode and frame rate.
cam | structure cam_data * | |
parm | structure v4l2_streamparm * |
References stop_preview().
Referenced by csi_v4l_do_ioctl().
static int csi_v4l2_suspend | ( | struct platform_device * | pdev, | |
pm_message_t | state | |||
) | [static] |
This function is called to put the sensor in a low power state. Refer to the document driver-model/driver.txt in the kernel source tree for more information.
pdev | the device structure used to give information on which I2C to suspend | |
state | the power state the device is entering |
References camera_power(), and stop_preview().
static int csi_v4l_close | ( | struct file * | file | ) | [static] |
V4L interface - close function
file | struct file * |
References csi_enable_mclk(), and stop_preview().
static long csi_v4l_do_ioctl | ( | struct file * | file, | |
unsigned int | ioctlnr, | |||
void * | arg | |||
) | [static] |
V4L interface - ioctl function
file | struct file* | |
ioctlnr | unsigned int | |
arg | void* |
References cap, csi_allocate_frame_buf(), csi_free_frame_buf(), csi_streamoff(), csi_streamon(), csi_v4l2_buffer_status(), csi_v4l2_g_fmt(), csi_v4l2_s_fmt(), csi_v4l2_s_param(), csi_v4l_dqueue(), start_preview(), and stop_preview().
static int csi_v4l_dqueue | ( | cam_data * | cam, | |
struct v4l2_buffer * | buf | |||
) | [static] |
Dequeue one V4L capture buffer
cam | structure cam_data * | |
buf | structure v4l2_buffer * |
Referenced by csi_v4l_do_ioctl().
static int csi_v4l_open | ( | struct file * | file | ) | [static] |
V4L interface - open function
file | structure file * |
References csi_enable_mclk().
static void init_camera_struct | ( | cam_data * | cam | ) | [static] |
initialize cam_data structure
cam | structure cam_data * |
References camera_callback().
static int start_preview | ( | cam_data * | cam | ) | [static] |
start the viewfinder job
cam | structure cam_data * |
Referenced by csi_v4l2_resume(), and csi_v4l_do_ioctl().
static int stop_preview | ( | cam_data * | cam | ) | [static] |
shut down the viewfinder job
cam | structure cam_data * |
Referenced by csi_v4l2_s_param(), csi_v4l2_suspend(), csi_v4l_close(), and csi_v4l_do_ioctl().
static int valid_mode | ( | u32 | palette | ) | [inline, static] |
Indicates whether the palette is supported.
palette | V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_UYVY or V4L2_PIX_FMT_YUV420 |
Referenced by csi_v4l2_s_fmt().
struct platform_driver csi_v4l2_driver [static] |
{
.driver = {
.name = "csi_v4l2",
},
.probe = csi_v4l2_probe,
.remove = __devexit_p(csi_v4l2_remove),
.shutdown = NULL,
}
This structure contains pointers to the power management callback functions.
struct v4l2_int_master csi_v4l2_master [static] |
{ .attach = csi_v4l2_master_attach, .detach = csi_v4l2_master_detach, }
Information about this driver.
struct v4l2_file_operations csi_v4l_fops [static] |
{ .owner = THIS_MODULE, .open = csi_v4l_open, .release = csi_v4l_close, .read = csi_v4l_read, .ioctl = csi_v4l_ioctl, .mmap = csi_mmap, }
This structure defines the functions to be called in this driver.
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |