Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sn9c102_core.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/compiler.h>
#include <linux/ioctl.h>
#include <linux/poll.h>
#include <linux/stat.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/version.h>
#include <linux/page-flags.h>
#include <asm/byteorder.h>
#include <asm/page.h>
#include <asm/uaccess.h>
#include "sn9c102.h"

Go to the source code of this file.

Macros

#define SN9C102_MODULE_NAME   "V4L2 driver for SN9C1xx PC Camera Controllers"
 
#define SN9C102_MODULE_ALIAS   "sn9c1xx"
 
#define SN9C102_MODULE_AUTHOR   "(C) 2004-2007 Luca Risolia"
 
#define SN9C102_AUTHOR_EMAIL   "<[email protected]>"
 
#define SN9C102_MODULE_LICENSE   "GPL"
 
#define SN9C102_MODULE_VERSION   "1:1.48"
 

Functions

 MODULE_DEVICE_TABLE (usb, sn9c102_id_table)
 
 MODULE_AUTHOR (SN9C102_MODULE_AUTHOR" "SN9C102_AUTHOR_EMAIL)
 
 MODULE_DESCRIPTION (SN9C102_MODULE_NAME)
 
 MODULE_ALIAS (SN9C102_MODULE_ALIAS)
 
 MODULE_VERSION (SN9C102_MODULE_VERSION)
 
 MODULE_LICENSE (SN9C102_MODULE_LICENSE)
 
 module_param_array (video_nr, short, NULL, 0444)
 
 MODULE_PARM_DESC (video_nr," <-1|n[,...]>""\nSpecify V4L2 minor mode number.""\n-1 = use next available (default)""\n n = use minor number n (integer >= 0)""\nYou can specify up to "__MODULE_STRING(SN9C102_MAX_DEVICES)" cameras this way.""\nFor example:""\nvideo_nr=-1,2,-1 would assign minor number 2 to""\nthe second camera and use auto for the first""\none and for every other camera.""\n")
 
 module_param_array (force_munmap, bool, NULL, 0444)
 
 MODULE_PARM_DESC (force_munmap," <0|1[,...]>""\nForce the application to unmap previously""\nmapped buffer memory before calling any VIDIOC_S_CROP or""\nVIDIOC_S_FMT ioctl's. Not all the applications support""\nthis feature. This parameter is specific for each""\ndetected camera.""\n0 = do not force memory unmapping""\n1 = force memory unmapping (save memory)""\nDefault value is "__MODULE_STRING(SN9C102_FORCE_MUNMAP)".""\n")
 
 module_param_array (frame_timeout, uint, NULL, 0644)
 
 MODULE_PARM_DESC (frame_timeout," <0|n[,...]>""\nTimeout for a video frame in seconds before""\nreturning an I/O error; 0 for infinity.""\nThis parameter is specific for each detected camera.""\nDefault value is "__MODULE_STRING(SN9C102_FRAME_TIMEOUT)".""\n")
 
 module_param (debug, ushort, 0644)
 
 MODULE_PARM_DESC (debug," <n>""\nDebugging information level, from 0 to 3:""\n0 = none (use carefully)""\n1 = critical errors""\n2 = significant informations""\n3 = more verbose messages""\nLevel 3 is useful for testing only.""\nDefault value is "__MODULE_STRING(SN9C102_DEBUG_LEVEL)".""\n")
 
int sn9c102_write_regs (struct sn9c102_device *cam, const u8 valreg[][2], int count)
 
int sn9c102_write_reg (struct sn9c102_device *cam, u8 value, u16 index)
 
int sn9c102_read_reg (struct sn9c102_device *cam, u16 index)
 
int sn9c102_pread_reg (struct sn9c102_device *cam, u16 index)
 
int sn9c102_i2c_try_raw_read (struct sn9c102_device *cam, const struct sn9c102_sensor *sensor, u8 data0, u8 data1, u8 n, u8 buffer[])
 
int sn9c102_i2c_try_raw_write (struct sn9c102_device *cam, const struct sn9c102_sensor *sensor, u8 n, u8 data0, u8 data1, u8 data2, u8 data3, u8 data4, u8 data5)
 
int sn9c102_i2c_try_read (struct sn9c102_device *cam, const struct sn9c102_sensor *sensor, u8 address)
 
int sn9c102_i2c_read (struct sn9c102_device *cam, u8 address)
 
int sn9c102_i2c_write (struct sn9c102_device *cam, u8 address, u8 value)
 
 module_usb_driver (sn9c102_usb_driver)
 

Macro Definition Documentation

#define SN9C102_AUTHOR_EMAIL   "<[email protected]>"

Definition at line 49 of file sn9c102_core.c.

#define SN9C102_MODULE_ALIAS   "sn9c1xx"

Definition at line 47 of file sn9c102_core.c.

#define SN9C102_MODULE_AUTHOR   "(C) 2004-2007 Luca Risolia"

Definition at line 48 of file sn9c102_core.c.

#define SN9C102_MODULE_LICENSE   "GPL"

Definition at line 50 of file sn9c102_core.c.

#define SN9C102_MODULE_NAME   "V4L2 driver for SN9C1xx PC Camera Controllers"

Definition at line 46 of file sn9c102_core.c.

#define SN9C102_MODULE_VERSION   "1:1.48"

Definition at line 51 of file sn9c102_core.c.

Function Documentation

MODULE_ALIAS ( SN9C102_MODULE_ALIAS  )
MODULE_AUTHOR ( SN9C102_MODULE_AUTHOR" "  SN9C102_AUTHOR_EMAIL)
MODULE_DESCRIPTION ( SN9C102_MODULE_NAME  )
MODULE_DEVICE_TABLE ( usb  ,
sn9c102_id_table   
)
MODULE_LICENSE ( SN9C102_MODULE_LICENSE  )
module_param ( debug  ,
ushort  ,
0644   
)
module_param_array ( video_nr  ,
short  ,
NULL  ,
0444   
)
module_param_array ( force_munmap  ,
bool  ,
NULL  ,
0444   
)
module_param_array ( frame_timeout  ,
uint  ,
NULL  ,
0644   
)
MODULE_PARM_DESC ( video_nr  ,
" <-1|n[,...]>""\nSpecify V4L2 minor mode number.""\n 1 = use next available (default)""\n n = use minor number n (integer >= 0)""\nYou can specify up to "__MODULE_STRING(SN9C102_MAX_DEVICES)" cameras this way.""\nFor example:""\nvideo_nr=-1,
,
-1 would assign minor number 2 to""\nthe second camera and use auto for the first""\none and for every other camera.""\n  
)
MODULE_PARM_DESC ( force_munmap  )
MODULE_PARM_DESC ( frame_timeout  ,
" <0|n[,...]>""\nTimeout for a video frame in seconds before""\nreturning an I/O error; 0 for infinity.""\nThis parameter is specific for each detected camera.""\nDefault value is "__MODULE_STRING(SN9C102_FRAME_TIMEOUT)".""\n"   
)
MODULE_PARM_DESC ( debug  ,
" <n>""\nDebugging information  level 
)
module_usb_driver ( sn9c102_usb_driver  )
MODULE_VERSION ( SN9C102_MODULE_VERSION  )
int sn9c102_i2c_read ( struct sn9c102_device cam,
u8  address 
)

Definition at line 497 of file sn9c102_core.c.

int sn9c102_i2c_try_raw_read ( struct sn9c102_device cam,
const struct sn9c102_sensor sensor,
u8  data0,
u8  data1,
u8  n,
u8  buffer[] 
)

Definition at line 381 of file sn9c102_core.c.

int sn9c102_i2c_try_raw_write ( struct sn9c102_device cam,
const struct sn9c102_sensor sensor,
u8  n,
u8  data0,
u8  data1,
u8  data2,
u8  data3,
u8  data4,
u8  data5 
)

Definition at line 440 of file sn9c102_core.c.

int sn9c102_i2c_try_read ( struct sn9c102_device cam,
const struct sn9c102_sensor sensor,
u8  address 
)

Definition at line 479 of file sn9c102_core.c.

int sn9c102_i2c_write ( struct sn9c102_device cam,
u8  address,
u8  value 
)

Definition at line 503 of file sn9c102_core.c.

int sn9c102_pread_reg ( struct sn9c102_device cam,
u16  index 
)

Definition at line 318 of file sn9c102_core.c.

int sn9c102_read_reg ( struct sn9c102_device cam,
u16  index 
)

Definition at line 302 of file sn9c102_core.c.

int sn9c102_write_reg ( struct sn9c102_device cam,
u8  value,
u16  index 
)

Definition at line 276 of file sn9c102_core.c.

int sn9c102_write_regs ( struct sn9c102_device cam,
const u8  valreg[][2],
int  count 
)

Definition at line 240 of file sn9c102_core.c.