Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sr030pc30.c File Reference
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <media/v4l2-device.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-mediabus.h>
#include <media/sr030pc30.h>

Go to the source code of this file.

Data Structures

struct  sr030pc30_info
 
struct  sr030pc30_format
 
struct  sr030pc30_frmsize
 
struct  i2c_regval
 

Macros

#define MODULE_NAME   "SR030PC30"
 
#define POWER_CTRL_REG   0x0001
 
#define PAGEMODE_REG   0x03
 
#define DEVICE_ID_REG   0x0004
 
#define NOON010PC30_ID   0x86
 
#define SR030PC30_ID   0x8C
 
#define VDO_CTL1_REG   0x0010
 
#define SUBSAMPL_NONE_VGA   0
 
#define SUBSAMPL_QVGA   0x10
 
#define SUBSAMPL_QQVGA   0x20
 
#define VDO_CTL2_REG   0x0011
 
#define SYNC_CTL_REG   0x0012
 
#define WIN_ROWH_REG   0x0020
 
#define WIN_ROWL_REG   0x0021
 
#define WIN_COLH_REG   0x0022
 
#define WIN_COLL_REG   0x0023
 
#define WIN_HEIGHTH_REG   0x0024
 
#define WIN_HEIGHTL_REG   0x0025
 
#define WIN_WIDTHH_REG   0x0026
 
#define WIN_WIDTHL_REG   0x0027
 
#define HBLANKH_REG   0x0040
 
#define HBLANKL_REG   0x0041
 
#define VSYNCH_REG   0x0042
 
#define VSYNCL_REG   0x0043
 
#define ISP_CTL_REG(n)   (0x1010 + (n))
 
#define YOFS_REG   0x1040
 
#define DARK_YOFS_REG   0x1041
 
#define AG_ABRTH_REG   0x1050
 
#define SAT_CTL_REG   0x1060
 
#define BSAT_REG   0x1061
 
#define RSAT_REG   0x1062
 
#define AG_SAT_TH_REG   0x1063
 
#define ZLPF_CTRL_REG   0x1110
 
#define ZLPF_CTRL2_REG   0x1112
 
#define ZLPF_AGH_THR_REG   0x1121
 
#define ZLPF_THR_REG   0x1160
 
#define ZLPF_DYN_THR_REG   0x1160
 
#define YCLPF_CTL1_REG   0x1240
 
#define YCLPF_CTL2_REG   0x1241
 
#define YCLPF_THR_REG   0x1250
 
#define BLPF_CTL_REG   0x1270
 
#define BLPF_THR1_REG   0x1274
 
#define BLPF_THR2_REG   0x1275
 
#define LENS_CTRL_REG   0x1410
 
#define LENS_XCEN_REG   0x1420
 
#define LENS_YCEN_REG   0x1421
 
#define LENS_R_COMP_REG   0x1422
 
#define LENS_G_COMP_REG   0x1423
 
#define LENS_B_COMP_REG   0x1424
 
#define CMC_CTL_REG   0x1510
 
#define CMC_OFSGH_REG   0x1514
 
#define CMC_OFSGL_REG   0x1516
 
#define CMC_SIGN_REG   0x1517
 
#define CMC_COEF_REG(n)   (0x1530 + (n))
 
#define CMC_OFS_REG(n)   (0x1540 + (n))
 
#define GMA_CTL_REG   0x1610
 
#define GMA_COEF_REG(n)   (0x1630 + (n))
 
#define AE_CTL1_REG   0x2010
 
#define AE_CTL2_REG   0x2011
 
#define AE_FRM_CTL_REG   0x2020
 
#define AE_FINE_CTL_REG(n)   (0x2028 + (n))
 
#define EXP_TIMEH_REG   0x2083
 
#define EXP_TIMEM_REG   0x2084
 
#define EXP_TIMEL_REG   0x2085
 
#define EXP_MMINH_REG   0x2086
 
#define EXP_MMINL_REG   0x2087
 
#define EXP_MMAXH_REG   0x2088
 
#define EXP_MMAXM_REG   0x2089
 
#define EXP_MMAXL_REG   0x208A
 
#define AWB_CTL1_REG   0x2210
 
#define AWB_ENABLE   0x80
 
#define AWB_CTL2_REG   0x2211
 
#define MWB_ENABLE   0x01
 
#define AWB_RGAIN_REG   0x2280
 
#define AWB_GGAIN_REG   0x2281
 
#define AWB_BGAIN_REG   0x2282
 
#define AWB_RMAX_REG   0x2283
 
#define AWB_RMIN_REG   0x2284
 
#define AWB_BMAX_REG   0x2285
 
#define AWB_BMIN_REG   0x2286
 
#define AWB_RMAXB_REG   0x2287
 
#define AWB_RMINB_REG   0x2288
 
#define AWB_BMAXB_REG   0x2289
 
#define AWB_BMINB_REG   0x228A
 
#define MWB_RGAIN_REG   0x22B2
 
#define MWB_BGAIN_REG   0x22B3
 
#define REG_TERM   0xFFFF
 
#define EXPOS_MIN_MS   1
 
#define EXPOS_MAX_MS   125
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_DEVICE_TABLE (i2c, sr030pc30_id)
 
 module_i2c_driver (sr030pc30_i2c_driver)
 
 MODULE_DESCRIPTION ("Siliconfile SR030PC30 camera driver")
 
 MODULE_AUTHOR ("Sylwester Nawrocki <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AE_CTL1_REG   0x2010

Definition at line 103 of file sr030pc30.c.

#define AE_CTL2_REG   0x2011

Definition at line 104 of file sr030pc30.c.

#define AE_FINE_CTL_REG (   n)    (0x2028 + (n))

Definition at line 106 of file sr030pc30.c.

#define AE_FRM_CTL_REG   0x2020

Definition at line 105 of file sr030pc30.c.

#define AG_ABRTH_REG   0x1050

Definition at line 64 of file sr030pc30.c.

#define AG_SAT_TH_REG   0x1063

Definition at line 68 of file sr030pc30.c.

#define AWB_BGAIN_REG   0x2282

Definition at line 123 of file sr030pc30.c.

#define AWB_BMAX_REG   0x2285

Definition at line 126 of file sr030pc30.c.

#define AWB_BMAXB_REG   0x2289

Definition at line 131 of file sr030pc30.c.

#define AWB_BMIN_REG   0x2286

Definition at line 127 of file sr030pc30.c.

#define AWB_BMINB_REG   0x228A

Definition at line 132 of file sr030pc30.c.

#define AWB_CTL1_REG   0x2210

Definition at line 116 of file sr030pc30.c.

#define AWB_CTL2_REG   0x2211

Definition at line 118 of file sr030pc30.c.

#define AWB_ENABLE   0x80

Definition at line 117 of file sr030pc30.c.

#define AWB_GGAIN_REG   0x2281

Definition at line 122 of file sr030pc30.c.

#define AWB_RGAIN_REG   0x2280

Definition at line 121 of file sr030pc30.c.

#define AWB_RMAX_REG   0x2283

Definition at line 124 of file sr030pc30.c.

#define AWB_RMAXB_REG   0x2287

Definition at line 129 of file sr030pc30.c.

#define AWB_RMIN_REG   0x2284

Definition at line 125 of file sr030pc30.c.

#define AWB_RMINB_REG   0x2288

Definition at line 130 of file sr030pc30.c.

#define BLPF_CTL_REG   0x1270

Definition at line 79 of file sr030pc30.c.

#define BLPF_THR1_REG   0x1274

Definition at line 80 of file sr030pc30.c.

#define BLPF_THR2_REG   0x1275

Definition at line 81 of file sr030pc30.c.

#define BSAT_REG   0x1061

Definition at line 66 of file sr030pc30.c.

#define CMC_COEF_REG (   n)    (0x1530 + (n))

Definition at line 95 of file sr030pc30.c.

#define CMC_CTL_REG   0x1510

Definition at line 90 of file sr030pc30.c.

#define CMC_OFS_REG (   n)    (0x1540 + (n))

Definition at line 97 of file sr030pc30.c.

#define CMC_OFSGH_REG   0x1514

Definition at line 91 of file sr030pc30.c.

#define CMC_OFSGL_REG   0x1516

Definition at line 92 of file sr030pc30.c.

#define CMC_SIGN_REG   0x1517

Definition at line 93 of file sr030pc30.c.

#define DARK_YOFS_REG   0x1041

Definition at line 63 of file sr030pc30.c.

#define DEVICE_ID_REG   0x0004

Definition at line 39 of file sr030pc30.c.

#define EXP_MMAXH_REG   0x2088

Definition at line 112 of file sr030pc30.c.

#define EXP_MMAXL_REG   0x208A

Definition at line 114 of file sr030pc30.c.

#define EXP_MMAXM_REG   0x2089

Definition at line 113 of file sr030pc30.c.

#define EXP_MMINH_REG   0x2086

Definition at line 110 of file sr030pc30.c.

#define EXP_MMINL_REG   0x2087

Definition at line 111 of file sr030pc30.c.

#define EXP_TIMEH_REG   0x2083

Definition at line 107 of file sr030pc30.c.

#define EXP_TIMEL_REG   0x2085

Definition at line 109 of file sr030pc30.c.

#define EXP_TIMEM_REG   0x2084

Definition at line 108 of file sr030pc30.c.

#define EXPOS_MAX_MS   125

Definition at line 141 of file sr030pc30.c.

#define EXPOS_MIN_MS   1

Definition at line 140 of file sr030pc30.c.

#define GMA_COEF_REG (   n)    (0x1630 + (n))

Definition at line 101 of file sr030pc30.c.

#define GMA_CTL_REG   0x1610

Definition at line 99 of file sr030pc30.c.

#define HBLANKH_REG   0x0040

Definition at line 56 of file sr030pc30.c.

#define HBLANKL_REG   0x0041

Definition at line 57 of file sr030pc30.c.

#define ISP_CTL_REG (   n)    (0x1010 + (n))

Definition at line 61 of file sr030pc30.c.

#define LENS_B_COMP_REG   0x1424

Definition at line 88 of file sr030pc30.c.

#define LENS_CTRL_REG   0x1410

Definition at line 83 of file sr030pc30.c.

#define LENS_G_COMP_REG   0x1423

Definition at line 87 of file sr030pc30.c.

#define LENS_R_COMP_REG   0x1422

Definition at line 86 of file sr030pc30.c.

#define LENS_XCEN_REG   0x1420

Definition at line 84 of file sr030pc30.c.

#define LENS_YCEN_REG   0x1421

Definition at line 85 of file sr030pc30.c.

#define MODULE_NAME   "SR030PC30"

Definition at line 31 of file sr030pc30.c.

#define MWB_BGAIN_REG   0x22B3

Definition at line 135 of file sr030pc30.c.

#define MWB_ENABLE   0x01

Definition at line 119 of file sr030pc30.c.

#define MWB_RGAIN_REG   0x22B2

Definition at line 134 of file sr030pc30.c.

#define NOON010PC30_ID   0x86

Definition at line 40 of file sr030pc30.c.

#define PAGEMODE_REG   0x03

Definition at line 38 of file sr030pc30.c.

#define POWER_CTRL_REG   0x0001

Definition at line 37 of file sr030pc30.c.

#define REG_TERM   0xFFFF

Definition at line 137 of file sr030pc30.c.

#define RSAT_REG   0x1062

Definition at line 67 of file sr030pc30.c.

#define SAT_CTL_REG   0x1060

Definition at line 65 of file sr030pc30.c.

#define SR030PC30_ID   0x8C

Definition at line 41 of file sr030pc30.c.

#define SUBSAMPL_NONE_VGA   0

Definition at line 43 of file sr030pc30.c.

#define SUBSAMPL_QQVGA   0x20

Definition at line 45 of file sr030pc30.c.

#define SUBSAMPL_QVGA   0x10

Definition at line 44 of file sr030pc30.c.

#define SYNC_CTL_REG   0x0012

Definition at line 47 of file sr030pc30.c.

#define VDO_CTL1_REG   0x0010

Definition at line 42 of file sr030pc30.c.

#define VDO_CTL2_REG   0x0011

Definition at line 46 of file sr030pc30.c.

#define VSYNCH_REG   0x0042

Definition at line 58 of file sr030pc30.c.

#define VSYNCL_REG   0x0043

Definition at line 59 of file sr030pc30.c.

#define WIN_COLH_REG   0x0022

Definition at line 50 of file sr030pc30.c.

#define WIN_COLL_REG   0x0023

Definition at line 51 of file sr030pc30.c.

#define WIN_HEIGHTH_REG   0x0024

Definition at line 52 of file sr030pc30.c.

#define WIN_HEIGHTL_REG   0x0025

Definition at line 53 of file sr030pc30.c.

#define WIN_ROWH_REG   0x0020

Definition at line 48 of file sr030pc30.c.

#define WIN_ROWL_REG   0x0021

Definition at line 49 of file sr030pc30.c.

#define WIN_WIDTHH_REG   0x0026

Definition at line 54 of file sr030pc30.c.

#define WIN_WIDTHL_REG   0x0027

Definition at line 55 of file sr030pc30.c.

#define YCLPF_CTL1_REG   0x1240

Definition at line 76 of file sr030pc30.c.

#define YCLPF_CTL2_REG   0x1241

Definition at line 77 of file sr030pc30.c.

#define YCLPF_THR_REG   0x1250

Definition at line 78 of file sr030pc30.c.

#define YOFS_REG   0x1040

Definition at line 62 of file sr030pc30.c.

#define ZLPF_AGH_THR_REG   0x1121

Definition at line 72 of file sr030pc30.c.

#define ZLPF_CTRL2_REG   0x1112

Definition at line 71 of file sr030pc30.c.

#define ZLPF_CTRL_REG   0x1110

Definition at line 70 of file sr030pc30.c.

#define ZLPF_DYN_THR_REG   0x1160

Definition at line 74 of file sr030pc30.c.

#define ZLPF_THR_REG   0x1160

Definition at line 73 of file sr030pc30.c.

Function Documentation

MODULE_AUTHOR ( "Sylwester Nawrocki <[email protected]>"  )
MODULE_DESCRIPTION ( "Siliconfile SR030PC30 camera driver )
MODULE_DEVICE_TABLE ( i2c  ,
sr030pc30_id   
)
module_i2c_driver ( sr030pc30_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)