Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mx3_camera.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/videodev2.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <media/v4l2-common.h>
#include <media/v4l2-dev.h>
#include <media/videobuf2-dma-contig.h>
#include <media/soc_camera.h>
#include <media/soc_mediabus.h>
#include <mach/ipu.h>
#include <linux/platform_data/camera-mx3.h>
#include <linux/platform_data/dma-imx.h>

Go to the source code of this file.

Data Structures

struct  mx3_camera_buffer
 
struct  mx3_camera_dev
 
struct  dma_chan_request
 

Macros

#define MX3_CAM_DRV_NAME   "mx3-camera"
 
#define CSI_REG_START   0x60
 
#define CSI_SENS_CONF   (0x60 - CSI_REG_START)
 
#define CSI_SENS_FRM_SIZE   (0x64 - CSI_REG_START)
 
#define CSI_ACT_FRM_SIZE   (0x68 - CSI_REG_START)
 
#define CSI_OUT_FRM_CTRL   (0x6C - CSI_REG_START)
 
#define CSI_TST_CTRL   (0x70 - CSI_REG_START)
 
#define CSI_CCIR_CODE_1   (0x74 - CSI_REG_START)
 
#define CSI_CCIR_CODE_2   (0x78 - CSI_REG_START)
 
#define CSI_CCIR_CODE_3   (0x7C - CSI_REG_START)
 
#define CSI_FLASH_STROBE_1   (0x80 - CSI_REG_START)
 
#define CSI_FLASH_STROBE_2   (0x84 - CSI_REG_START)
 
#define CSI_SENS_CONF_VSYNC_POL_SHIFT   0
 
#define CSI_SENS_CONF_HSYNC_POL_SHIFT   1
 
#define CSI_SENS_CONF_DATA_POL_SHIFT   2
 
#define CSI_SENS_CONF_PIX_CLK_POL_SHIFT   3
 
#define CSI_SENS_CONF_SENS_PRTCL_SHIFT   4
 
#define CSI_SENS_CONF_SENS_CLKSRC_SHIFT   7
 
#define CSI_SENS_CONF_DATA_FMT_SHIFT   8
 
#define CSI_SENS_CONF_DATA_WIDTH_SHIFT   10
 
#define CSI_SENS_CONF_EXT_VSYNC_SHIFT   15
 
#define CSI_SENS_CONF_DIVRATIO_SHIFT   16
 
#define CSI_SENS_CONF_DATA_FMT_RGB_YUV444   (0UL << CSI_SENS_CONF_DATA_FMT_SHIFT)
 
#define CSI_SENS_CONF_DATA_FMT_YUV422   (2UL << CSI_SENS_CONF_DATA_FMT_SHIFT)
 
#define CSI_SENS_CONF_DATA_FMT_BAYER   (3UL << CSI_SENS_CONF_DATA_FMT_SHIFT)
 
#define MAX_VIDEO_MEM   16
 

Functions

 module_platform_driver (mx3_camera_driver)
 
 MODULE_DESCRIPTION ("i.MX3x SoC Camera Host driver")
 
 MODULE_AUTHOR ("Guennadi Liakhovetski <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_VERSION ("0.2.3")
 
 MODULE_ALIAS ("platform:"MX3_CAM_DRV_NAME)
 

Macro Definition Documentation

#define CSI_ACT_FRM_SIZE   (0x68 - CSI_REG_START)

Definition at line 38 of file mx3_camera.c.

#define CSI_CCIR_CODE_1   (0x74 - CSI_REG_START)

Definition at line 41 of file mx3_camera.c.

#define CSI_CCIR_CODE_2   (0x78 - CSI_REG_START)

Definition at line 42 of file mx3_camera.c.

#define CSI_CCIR_CODE_3   (0x7C - CSI_REG_START)

Definition at line 43 of file mx3_camera.c.

#define CSI_FLASH_STROBE_1   (0x80 - CSI_REG_START)

Definition at line 44 of file mx3_camera.c.

#define CSI_FLASH_STROBE_2   (0x84 - CSI_REG_START)

Definition at line 45 of file mx3_camera.c.

#define CSI_OUT_FRM_CTRL   (0x6C - CSI_REG_START)

Definition at line 39 of file mx3_camera.c.

#define CSI_REG_START   0x60

Definition at line 34 of file mx3_camera.c.

#define CSI_SENS_CONF   (0x60 - CSI_REG_START)

Definition at line 36 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_FMT_BAYER   (3UL << CSI_SENS_CONF_DATA_FMT_SHIFT)

Definition at line 60 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_FMT_RGB_YUV444   (0UL << CSI_SENS_CONF_DATA_FMT_SHIFT)

Definition at line 58 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_FMT_SHIFT   8

Definition at line 53 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_FMT_YUV422   (2UL << CSI_SENS_CONF_DATA_FMT_SHIFT)

Definition at line 59 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_POL_SHIFT   2

Definition at line 49 of file mx3_camera.c.

#define CSI_SENS_CONF_DATA_WIDTH_SHIFT   10

Definition at line 54 of file mx3_camera.c.

#define CSI_SENS_CONF_DIVRATIO_SHIFT   16

Definition at line 56 of file mx3_camera.c.

#define CSI_SENS_CONF_EXT_VSYNC_SHIFT   15

Definition at line 55 of file mx3_camera.c.

#define CSI_SENS_CONF_HSYNC_POL_SHIFT   1

Definition at line 48 of file mx3_camera.c.

#define CSI_SENS_CONF_PIX_CLK_POL_SHIFT   3

Definition at line 50 of file mx3_camera.c.

#define CSI_SENS_CONF_SENS_CLKSRC_SHIFT   7

Definition at line 52 of file mx3_camera.c.

#define CSI_SENS_CONF_SENS_PRTCL_SHIFT   4

Definition at line 51 of file mx3_camera.c.

#define CSI_SENS_CONF_VSYNC_POL_SHIFT   0

Definition at line 47 of file mx3_camera.c.

#define CSI_SENS_FRM_SIZE   (0x64 - CSI_REG_START)

Definition at line 37 of file mx3_camera.c.

#define CSI_TST_CTRL   (0x70 - CSI_REG_START)

Definition at line 40 of file mx3_camera.c.

#define MAX_VIDEO_MEM   16

Definition at line 62 of file mx3_camera.c.

#define MX3_CAM_DRV_NAME   "mx3-camera"

Definition at line 31 of file mx3_camera.c.

Function Documentation

MODULE_ALIAS ( "platform:"  MX3_CAM_DRV_NAME)
MODULE_AUTHOR ( "Guennadi Liakhovetski <[email protected]>"  )
MODULE_DESCRIPTION ( "i.MX3x SoC Camera Host driver )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( mx3_camera_driver  )
MODULE_VERSION ( "0.2.3"  )