Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lgdt3305.c File Reference
#include <asm/div64.h>
#include <linux/dvb/frontend.h>
#include <linux/slab.h>
#include "dvb_math.h"
#include "lgdt3305.h"

Go to the source code of this file.

Data Structures

struct  lgdt3305_state
 
struct  lgdt3305_reg
 

Macros

#define DBG_INFO   1
 
#define DBG_REG   2
 
#define lg_printk(kern, fmt, arg...)   printk(kern "%s: " fmt, __func__, ##arg)
 
#define lg_info(fmt, arg...)   printk(KERN_INFO "lgdt3305: " fmt, ##arg)
 
#define lg_warn(fmt, arg...)   lg_printk(KERN_WARNING, fmt, ##arg)
 
#define lg_err(fmt, arg...)   lg_printk(KERN_ERR, fmt, ##arg)
 
#define lg_dbg(fmt, arg...)
 
#define lg_reg(fmt, arg...)
 
#define lg_fail(ret)
 
#define LGDT3305_GEN_CTRL_1   0x0000
 
#define LGDT3305_GEN_CTRL_2   0x0001
 
#define LGDT3305_GEN_CTRL_3   0x0002
 
#define LGDT3305_GEN_STATUS   0x0003
 
#define LGDT3305_GEN_CONTROL   0x0007
 
#define LGDT3305_GEN_CTRL_4   0x000a
 
#define LGDT3305_DGTL_AGC_REF_1   0x0012
 
#define LGDT3305_DGTL_AGC_REF_2   0x0013
 
#define LGDT3305_CR_CTR_FREQ_1   0x0106
 
#define LGDT3305_CR_CTR_FREQ_2   0x0107
 
#define LGDT3305_CR_CTR_FREQ_3   0x0108
 
#define LGDT3305_CR_CTR_FREQ_4   0x0109
 
#define LGDT3305_CR_MSE_1   0x011b
 
#define LGDT3305_CR_MSE_2   0x011c
 
#define LGDT3305_CR_LOCK_STATUS   0x011d
 
#define LGDT3305_CR_CTRL_7   0x0126
 
#define LGDT3305_AGC_POWER_REF_1   0x0300
 
#define LGDT3305_AGC_POWER_REF_2   0x0301
 
#define LGDT3305_AGC_DELAY_PT_1   0x0302
 
#define LGDT3305_AGC_DELAY_PT_2   0x0303
 
#define LGDT3305_RFAGC_LOOP_FLTR_BW_1   0x0306
 
#define LGDT3305_RFAGC_LOOP_FLTR_BW_2   0x0307
 
#define LGDT3305_IFBW_1   0x0308
 
#define LGDT3305_IFBW_2   0x0309
 
#define LGDT3305_AGC_CTRL_1   0x030c
 
#define LGDT3305_AGC_CTRL_4   0x0314
 
#define LGDT3305_EQ_MSE_1   0x0413
 
#define LGDT3305_EQ_MSE_2   0x0414
 
#define LGDT3305_EQ_MSE_3   0x0415
 
#define LGDT3305_PT_MSE_1   0x0417
 
#define LGDT3305_PT_MSE_2   0x0418
 
#define LGDT3305_PT_MSE_3   0x0419
 
#define LGDT3305_FEC_BLOCK_CTRL   0x0504
 
#define LGDT3305_FEC_LOCK_STATUS   0x050a
 
#define LGDT3305_FEC_PKT_ERR_1   0x050c
 
#define LGDT3305_FEC_PKT_ERR_2   0x050d
 
#define LGDT3305_TP_CTRL_1   0x050e
 
#define LGDT3305_BERT_PERIOD   0x0801
 
#define LGDT3305_BERT_ERROR_COUNT_1   0x080a
 
#define LGDT3305_BERT_ERROR_COUNT_2   0x080b
 
#define LGDT3305_BERT_ERROR_COUNT_3   0x080c
 
#define LGDT3305_BERT_ERROR_COUNT_4   0x080d
 
#define read_reg(state, reg)
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"set debug level (info=1, reg=2 (or-able))")
 
struct dvb_frontendlgdt3305_attach (const struct lgdt3305_config *config, struct i2c_adapter *i2c_adap)
 
 EXPORT_SYMBOL (lgdt3305_attach)
 
 MODULE_DESCRIPTION ("LG Electronics LGDT3304/5 ATSC/QAM-B Demodulator Driver")
 
 MODULE_AUTHOR ("Michael Krufky <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION ("0.2")
 

Macro Definition Documentation

#define DBG_INFO   1

Definition at line 34 of file lgdt3305.c.

#define DBG_REG   2

Definition at line 35 of file lgdt3305.c.

#define lg_dbg (   fmt,
  arg... 
)
Value:
if (debug & DBG_INFO) \
lg_printk(KERN_DEBUG, fmt, ##arg)

Definition at line 43 of file lgdt3305.c.

#define lg_err (   fmt,
  arg... 
)    lg_printk(KERN_ERR, fmt, ##arg)

Definition at line 42 of file lgdt3305.c.

#define lg_fail (   ret)
Value:
({ \
int __ret; \
__ret = (ret < 0); \
if (__ret) \
lg_err("error %d on line %d\n", ret, __LINE__); \
__ret; \
})

Definition at line 48 of file lgdt3305.c.

#define lg_info (   fmt,
  arg... 
)    printk(KERN_INFO "lgdt3305: " fmt, ##arg)

Definition at line 40 of file lgdt3305.c.

#define lg_printk (   kern,
  fmt,
  arg... 
)    printk(kern "%s: " fmt, __func__, ##arg)

Definition at line 37 of file lgdt3305.c.

#define lg_reg (   fmt,
  arg... 
)
Value:
if (debug & DBG_REG) \
lg_printk(KERN_DEBUG, fmt, ##arg)

Definition at line 45 of file lgdt3305.c.

#define lg_warn (   fmt,
  arg... 
)    lg_printk(KERN_WARNING, fmt, ##arg)

Definition at line 41 of file lgdt3305.c.

#define LGDT3305_AGC_CTRL_1   0x030c

Definition at line 96 of file lgdt3305.c.

#define LGDT3305_AGC_CTRL_4   0x0314

Definition at line 97 of file lgdt3305.c.

#define LGDT3305_AGC_DELAY_PT_1   0x0302

Definition at line 90 of file lgdt3305.c.

#define LGDT3305_AGC_DELAY_PT_2   0x0303

Definition at line 91 of file lgdt3305.c.

#define LGDT3305_AGC_POWER_REF_1   0x0300

Definition at line 88 of file lgdt3305.c.

#define LGDT3305_AGC_POWER_REF_2   0x0301

Definition at line 89 of file lgdt3305.c.

#define LGDT3305_BERT_ERROR_COUNT_1   0x080a

Definition at line 110 of file lgdt3305.c.

#define LGDT3305_BERT_ERROR_COUNT_2   0x080b

Definition at line 111 of file lgdt3305.c.

#define LGDT3305_BERT_ERROR_COUNT_3   0x080c

Definition at line 112 of file lgdt3305.c.

#define LGDT3305_BERT_ERROR_COUNT_4   0x080d

Definition at line 113 of file lgdt3305.c.

#define LGDT3305_BERT_PERIOD   0x0801

Definition at line 109 of file lgdt3305.c.

#define LGDT3305_CR_CTR_FREQ_1   0x0106

Definition at line 80 of file lgdt3305.c.

#define LGDT3305_CR_CTR_FREQ_2   0x0107

Definition at line 81 of file lgdt3305.c.

#define LGDT3305_CR_CTR_FREQ_3   0x0108

Definition at line 82 of file lgdt3305.c.

#define LGDT3305_CR_CTR_FREQ_4   0x0109

Definition at line 83 of file lgdt3305.c.

#define LGDT3305_CR_CTRL_7   0x0126

Definition at line 87 of file lgdt3305.c.

#define LGDT3305_CR_LOCK_STATUS   0x011d

Definition at line 86 of file lgdt3305.c.

#define LGDT3305_CR_MSE_1   0x011b

Definition at line 84 of file lgdt3305.c.

#define LGDT3305_CR_MSE_2   0x011c

Definition at line 85 of file lgdt3305.c.

#define LGDT3305_DGTL_AGC_REF_1   0x0012

Definition at line 78 of file lgdt3305.c.

#define LGDT3305_DGTL_AGC_REF_2   0x0013

Definition at line 79 of file lgdt3305.c.

#define LGDT3305_EQ_MSE_1   0x0413

Definition at line 98 of file lgdt3305.c.

#define LGDT3305_EQ_MSE_2   0x0414

Definition at line 99 of file lgdt3305.c.

#define LGDT3305_EQ_MSE_3   0x0415

Definition at line 100 of file lgdt3305.c.

#define LGDT3305_FEC_BLOCK_CTRL   0x0504

Definition at line 104 of file lgdt3305.c.

#define LGDT3305_FEC_LOCK_STATUS   0x050a

Definition at line 105 of file lgdt3305.c.

#define LGDT3305_FEC_PKT_ERR_1   0x050c

Definition at line 106 of file lgdt3305.c.

#define LGDT3305_FEC_PKT_ERR_2   0x050d

Definition at line 107 of file lgdt3305.c.

#define LGDT3305_GEN_CONTROL   0x0007

Definition at line 76 of file lgdt3305.c.

#define LGDT3305_GEN_CTRL_1   0x0000

Definition at line 72 of file lgdt3305.c.

#define LGDT3305_GEN_CTRL_2   0x0001

Definition at line 73 of file lgdt3305.c.

#define LGDT3305_GEN_CTRL_3   0x0002

Definition at line 74 of file lgdt3305.c.

#define LGDT3305_GEN_CTRL_4   0x000a

Definition at line 77 of file lgdt3305.c.

#define LGDT3305_GEN_STATUS   0x0003

Definition at line 75 of file lgdt3305.c.

#define LGDT3305_IFBW_1   0x0308

Definition at line 94 of file lgdt3305.c.

#define LGDT3305_IFBW_2   0x0309

Definition at line 95 of file lgdt3305.c.

#define LGDT3305_PT_MSE_1   0x0417

Definition at line 101 of file lgdt3305.c.

#define LGDT3305_PT_MSE_2   0x0418

Definition at line 102 of file lgdt3305.c.

#define LGDT3305_PT_MSE_3   0x0419

Definition at line 103 of file lgdt3305.c.

#define LGDT3305_RFAGC_LOOP_FLTR_BW_1   0x0306

Definition at line 92 of file lgdt3305.c.

#define LGDT3305_RFAGC_LOOP_FLTR_BW_2   0x0307

Definition at line 93 of file lgdt3305.c.

#define LGDT3305_TP_CTRL_1   0x050e

Definition at line 108 of file lgdt3305.c.

#define read_reg (   state,
  reg 
)
Value:
({ \
int ret = lgdt3305_read_reg(state, reg, &__val); \
if (lg_fail(ret)) \
__val = 0; \
__val; \
})

Definition at line 165 of file lgdt3305.c.

Function Documentation

EXPORT_SYMBOL ( lgdt3305_attach  )
struct dvb_frontend* lgdt3305_attach ( const struct lgdt3305_config config,
struct i2c_adapter i2c_adap 
)
read

Definition at line 1110 of file lgdt3305.c.

MODULE_AUTHOR ( "Michael Krufky <[email protected]>"  )
MODULE_DESCRIPTION ( "LG Electronics LGDT3304/5 ATSC/QAM-B Demodulator Driver"  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"set debug level (info=1, reg=2 (or-able))"   
)
MODULE_VERSION ( "0.2"  )