Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
gl860.c File Reference
#include "gspca.h"
#include "gl860.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SD_SETGET(thename)
 
#define GL860_NCTRLS   11
 
#define SET_MY_CTRL(theid, thetype, thelabel, thename)
 

Functions

 MODULE_AUTHOR ("Olivier Lorin <[email protected]>")
 
 MODULE_DESCRIPTION ("Genesys Logic USB PC Camera Driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param (AC50Hz, int, 0644)
 
 MODULE_PARM_DESC (AC50Hz," Does AC power frequency is 50Hz? (0/1)")
 
 module_param_string (sensor, sensor, sizeof(sensor), 0644)
 
 MODULE_PARM_DESC (sensor," Driver sensor ('MI1320'/'MI2020'/'OV9655'/'OV2640')")
 
 MODULE_DEVICE_TABLE (usb, device_table)
 
 module_usb_driver (sd_driver)
 
int gl860_RTx (struct gspca_dev *gspca_dev, unsigned char pref, u32 req, u16 val, u16 index, s32 len, void *pdata)
 
int fetch_validx (struct gspca_dev *gspca_dev, struct validx *tbl, int len)
 
int keep_on_fetching_validx (struct gspca_dev *gspca_dev, struct validx *tbl, int len, int n)
 
void fetch_idxdata (struct gspca_dev *gspca_dev, struct idxdata *tbl, int len)
 

Macro Definition Documentation

#define GL860_NCTRLS   11

Definition at line 92 of file gl860.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 22 of file gl860.c.

#define SD_SETGET (   thename)
Value:
static int sd_set_##thename(struct gspca_dev *gspca_dev, s32 val)\
{\
struct sd *sd = (struct sd *) gspca_dev;\
sd->vcur.thename = val;\
sd->waitSet = 1;\
return 0;\
} \
static int sd_get_##thename(struct gspca_dev *gspca_dev, s32 *val)\
{\
struct sd *sd = (struct sd *) gspca_dev;\
\
*val = sd->vcur.thename;\
return 0;\
}

Definition at line 62 of file gl860.c.

#define SET_MY_CTRL (   theid,
  thetype,
  thelabel,
  thename 
)
Value:
if (sd->vmax.thename != 0) {\
sd_ctrls[nCtrls].qctrl.id = theid;\
sd_ctrls[nCtrls].qctrl.type = thetype;\
strcpy(sd_ctrls[nCtrls].qctrl.name, thelabel);\
sd_ctrls[nCtrls].qctrl.minimum = 0;\
sd_ctrls[nCtrls].qctrl.maximum = sd->vmax.thename;\
sd_ctrls[nCtrls].qctrl.default_value = sd->vcur.thename;\
sd_ctrls[nCtrls].qctrl.step = \
(sd->vmax.thename < 16) ? 1 : sd->vmax.thename/16;\
sd_ctrls[nCtrls].set = sd_set_##thename;\
sd_ctrls[nCtrls].get = sd_get_##thename;\
nCtrls++;\
}

Definition at line 100 of file gl860.c.

Function Documentation

void fetch_idxdata ( struct gspca_dev gspca_dev,
struct idxdata tbl,
int  len 
)

Definition at line 607 of file gl860.c.

int fetch_validx ( struct gspca_dev gspca_dev,
struct validx tbl,
int  len 
)

Definition at line 576 of file gl860.c.

int gl860_RTx ( struct gspca_dev gspca_dev,
unsigned char  pref,
u32  req,
u16  val,
u16  index,
s32  len,
void pdata 
)

Definition at line 534 of file gl860.c.

int keep_on_fetching_validx ( struct gspca_dev gspca_dev,
struct validx tbl,
int  len,
int  n 
)

Definition at line 592 of file gl860.c.

MODULE_AUTHOR ( "Olivier Lorin <[email protected]>"  )
MODULE_DESCRIPTION ( "Genesys Logic USB PC Camera Driver"  )
MODULE_DEVICE_TABLE ( usb  ,
device_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( AC50Hz  ,
int  ,
0644   
)
module_param_string ( sensor  ,
sensor  ,
sizeof(sensor)  ,
0644   
)
MODULE_PARM_DESC ( AC50Hz  ,
" Does AC power frequency is 50Hz? (0/1)"   
)
MODULE_PARM_DESC ( sensor  ,
" Driver sensor ('MI1320'/'MI2020'/'OV9655'/'OV2640')"   
)
module_usb_driver ( sd_driver  )