Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
mxl111sf.c File Reference
#include <linux/vmalloc.h>
#include <linux/i2c.h>
#include "mxl111sf.h"
#include "mxl111sf-reg.h"
#include "mxl111sf-phy.h"
#include "mxl111sf-i2c.h"
#include "mxl111sf-gpio.h"
#include "mxl111sf-demod.h"
#include "mxl111sf-tuner.h"
#include "lgdt3305.h"
#include "lg2160.h"

Go to the source code of this file.

Macros

#define ANT_PATH_AUTO   0
 
#define ANT_PATH_EXTERNAL   1
 
#define ANT_PATH_INTERNAL   2
 
#define deb_info   pr_debug
 
#define deb_reg   pr_debug
 
#define deb_adv   pr_debug
 
#define err   pr_err
 
#define info   pr_info
 
#define MXL_CMD_REG_READ   0xaa
 
#define MXL_CMD_REG_WRITE   0x55
 
#define get_chip_info(state)
 
#define DbgAntHunt(x, pwr0, pwr1, pwr2, pwr3)
 
#define ANT_HUNT_SLEEP   90
 
#define ANT_EXT_TWEAK   0
 

Functions

 module_param_named (debug, dvb_usb_mxl111sf_debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"set debugging level ""(1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able)).")
 
 module_param_named (isoc, dvb_usb_mxl111sf_isoc, int, 0644)
 
 MODULE_PARM_DESC (isoc,"enable usb isoc xfer (0=bulk, 1=isoc).")
 
 module_param_named (spi, dvb_usb_mxl111sf_spi, int, 0644)
 
 MODULE_PARM_DESC (spi,"use spi rather than tp for data xfer (0=tp, 1=spi).")
 
 module_param_named (rfswitch, dvb_usb_mxl111sf_rfswitch, int, 0644)
 
 MODULE_PARM_DESC (rfswitch,"force rf switch position (0=auto, 1=ext, 2=int).")
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr)
 
int mxl111sf_ctrl_msg (struct dvb_usb_device *d, u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen)
 
int mxl111sf_read_reg (struct mxl111sf_state *state, u8 addr, u8 *data)
 
int mxl111sf_write_reg (struct mxl111sf_state *state, u8 addr, u8 data)
 
int mxl111sf_write_reg_mask (struct mxl111sf_state *state, u8 addr, u8 mask, u8 data)
 
int mxl111sf_ctrl_program_regs (struct mxl111sf_state *state, struct mxl111sf_reg_ctrl_info *ctrl_reg_info)
 
 MODULE_DEVICE_TABLE (usb, mxl111sf_id_table)
 
 module_usb_driver (mxl111sf_usb_driver)
 
 MODULE_AUTHOR ("Michael Krufky <[email protected]>")
 
 MODULE_DESCRIPTION ("Driver for MaxLinear MxL111SF")
 
 MODULE_VERSION ("1.0")
 
 MODULE_LICENSE ("GPL")
 

Variables

int dvb_usb_mxl111sf_debug
 
int dvb_usb_mxl111sf_isoc
 
int dvb_usb_mxl111sf_spi
 
int dvb_usb_mxl111sf_rfswitch
 
struct i2c_algorithm mxl111sf_i2c_algo
 

Macro Definition Documentation

#define ANT_EXT_TWEAK   0

Definition at line 811 of file mxl111sf.c.

#define ANT_HUNT_SLEEP   90

Definition at line 810 of file mxl111sf.c.

#define ANT_PATH_AUTO   0

Definition at line 39 of file mxl111sf.c.

#define ANT_PATH_EXTERNAL   1

Definition at line 40 of file mxl111sf.c.

#define ANT_PATH_INTERNAL   2

Definition at line 41 of file mxl111sf.c.

#define DbgAntHunt (   x,
  pwr0,
  pwr1,
  pwr2,
  pwr3 
)
Value:
err("%s(%d) FINAL input set to %s rxPwr:%d|%d|%d|%d\n", \
__func__, __LINE__, \
(ANT_PATH_EXTERNAL == x) ? "EXTERNAL" : "INTERNAL", \
pwr0, pwr1, pwr2, pwr3)

Definition at line 804 of file mxl111sf.c.

#define deb_adv   pr_debug

Definition at line 57 of file mxl111sf.c.

#define deb_info   pr_debug

Definition at line 55 of file mxl111sf.c.

#define deb_reg   pr_debug

Definition at line 56 of file mxl111sf.c.

#define err   pr_err

Definition at line 58 of file mxl111sf.c.

#define get_chip_info (   state)
Value:
({ \
int ___ret; \
___ret = mxl1x1sf_get_chip_info(state); \
if (mxl_fail(___ret)) { \
mxl_debug("failed to get chip info" \
" on first probe attempt"); \
___ret = mxl1x1sf_get_chip_info(state); \
if (mxl_fail(___ret)) \
err("failed to get chip info during probe"); \
mxl_debug("probe needed a retry " \
"in order to succeed."); \
} \
___ret; \
})

Definition at line 233 of file mxl111sf.c.

u32 info   pr_info

Definition at line 59 of file mxl111sf.c.

#define MXL_CMD_REG_READ   0xaa

Definition at line 84 of file mxl111sf.c.

#define MXL_CMD_REG_WRITE   0x55

Definition at line 85 of file mxl111sf.c.

Function Documentation

DVB_DEFINE_MOD_OPT_ADAPTER_NR ( adapter_nr  )
MODULE_AUTHOR ( "Michael Krufky <[email protected]>"  )
MODULE_DESCRIPTION ( "Driver for MaxLinear MxL111SF"  )
MODULE_DEVICE_TABLE ( usb  ,
mxl111sf_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_param_named ( debug  ,
dvb_usb_mxl111sf_debug  ,
int  ,
0644   
)
module_param_named ( isoc  ,
dvb_usb_mxl111sf_isoc  ,
int  ,
0644   
)
module_param_named ( spi  ,
dvb_usb_mxl111sf_spi  ,
int  ,
0644   
)
module_param_named ( rfswitch  ,
dvb_usb_mxl111sf_rfswitch  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"set debugging level ""(1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able))."   
)
MODULE_PARM_DESC ( isoc  ,
"enable usb isoc xfer (0=bulk, 1=isoc)."   
)
MODULE_PARM_DESC ( spi  ,
"use spi rather than tp for data xfer (0=tp, 1=spi)."   
)
MODULE_PARM_DESC ( rfswitch  ,
"force rf switch position (0=auto, 1=ext, 2=int)."   
)
module_usb_driver ( mxl111sf_usb_driver  )
MODULE_VERSION ( "1.0"  )
int mxl111sf_ctrl_msg ( struct dvb_usb_device d,
u8  cmd,
u8 wbuf,
int  wlen,
u8 rbuf,
int  rlen 
)

Definition at line 61 of file mxl111sf.c.

int mxl111sf_ctrl_program_regs ( struct mxl111sf_state state,
struct mxl111sf_reg_ctrl_info ctrl_reg_info 
)

Definition at line 156 of file mxl111sf.c.

int mxl111sf_read_reg ( struct mxl111sf_state state,
u8  addr,
u8 data 
)

Definition at line 87 of file mxl111sf.c.

int mxl111sf_write_reg ( struct mxl111sf_state state,
u8  addr,
u8  data 
)

Definition at line 111 of file mxl111sf.c.

int mxl111sf_write_reg_mask ( struct mxl111sf_state state,
u8  addr,
u8  mask,
u8  data 
)

Definition at line 126 of file mxl111sf.c.

Variable Documentation

int dvb_usb_mxl111sf_debug

Definition at line 26 of file mxl111sf.c.

int dvb_usb_mxl111sf_isoc

Definition at line 31 of file mxl111sf.c.

int dvb_usb_mxl111sf_rfswitch
Initial value:

Definition at line 43 of file mxl111sf.c.

int dvb_usb_mxl111sf_spi

Definition at line 35 of file mxl111sf.c.

struct i2c_algorithm mxl111sf_i2c_algo
Initial value:
= {
.master_xfer = mxl111sf_i2c_xfer,
.functionality = mxl111sf_i2c_func,
}

Definition at line 888 of file mxl111sf.c.