Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tda10048.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/math64.h>
#include <asm/div64.h>
#include "dvb_frontend.h"
#include "dvb_math.h"
#include "tda10048.h"

Go to the source code of this file.

Data Structures

struct  tda10048_state
 
struct  init_tab
 
struct  pll_tab
 
struct  snr_tab
 

Macros

#define TDA10048_DEFAULT_FIRMWARE   "dvb-fe-tda10048-1.0.fw"
 
#define TDA10048_DEFAULT_FIRMWARE_SIZE   24878
 
#define TDA10048_IDENTITY   0x00
 
#define TDA10048_VERSION   0x01
 
#define TDA10048_DSP_CODE_CPT   0x0C
 
#define TDA10048_DSP_CODE_IN   0x0E
 
#define TDA10048_IN_CONF1   0x10
 
#define TDA10048_IN_CONF2   0x11
 
#define TDA10048_IN_CONF3   0x12
 
#define TDA10048_OUT_CONF1   0x14
 
#define TDA10048_OUT_CONF2   0x15
 
#define TDA10048_OUT_CONF3   0x16
 
#define TDA10048_AUTO   0x18
 
#define TDA10048_SYNC_STATUS   0x1A
 
#define TDA10048_CONF_C4_1   0x1E
 
#define TDA10048_CONF_C4_2   0x1F
 
#define TDA10048_CODE_IN_RAM   0x20
 
#define TDA10048_CHANNEL_INFO1_R   0x22
 
#define TDA10048_CHANNEL_INFO2_R   0x23
 
#define TDA10048_CHANNEL_INFO1   0x24
 
#define TDA10048_CHANNEL_INFO2   0x25
 
#define TDA10048_TIME_ERROR_R   0x26
 
#define TDA10048_TIME_ERROR   0x27
 
#define TDA10048_FREQ_ERROR_LSB_R   0x28
 
#define TDA10048_FREQ_ERROR_MSB_R   0x29
 
#define TDA10048_FREQ_ERROR_LSB   0x2A
 
#define TDA10048_FREQ_ERROR_MSB   0x2B
 
#define TDA10048_IT_SEL   0x30
 
#define TDA10048_IT_STAT   0x32
 
#define TDA10048_DSP_AD_LSB   0x3C
 
#define TDA10048_DSP_AD_MSB   0x3D
 
#define TDA10048_DSP_REG_LSB   0x3E
 
#define TDA10048_DSP_REG_MSB   0x3F
 
#define TDA10048_CONF_TRISTATE1   0x44
 
#define TDA10048_CONF_TRISTATE2   0x45
 
#define TDA10048_CONF_POLARITY   0x46
 
#define TDA10048_GPIO_SP_DS0   0x48
 
#define TDA10048_GPIO_SP_DS1   0x49
 
#define TDA10048_GPIO_SP_DS2   0x4A
 
#define TDA10048_GPIO_SP_DS3   0x4B
 
#define TDA10048_GPIO_OUT_SEL   0x4C
 
#define TDA10048_GPIO_SELECT   0x4D
 
#define TDA10048_IC_MODE   0x4E
 
#define TDA10048_CONF_XO   0x50
 
#define TDA10048_CONF_PLL1   0x51
 
#define TDA10048_CONF_PLL2   0x52
 
#define TDA10048_CONF_PLL3   0x53
 
#define TDA10048_CONF_ADC   0x54
 
#define TDA10048_CONF_ADC_2   0x55
 
#define TDA10048_CONF_C1_1   0x60
 
#define TDA10048_CONF_C1_3   0x62
 
#define TDA10048_AGC_CONF   0x70
 
#define TDA10048_AGC_THRESHOLD_LSB   0x72
 
#define TDA10048_AGC_THRESHOLD_MSB   0x73
 
#define TDA10048_AGC_RENORM   0x74
 
#define TDA10048_AGC_GAINS   0x76
 
#define TDA10048_AGC_TUN_MIN   0x78
 
#define TDA10048_AGC_TUN_MAX   0x79
 
#define TDA10048_AGC_IF_MIN   0x7A
 
#define TDA10048_AGC_IF_MAX   0x7B
 
#define TDA10048_AGC_TUN_LEVEL   0x7E
 
#define TDA10048_AGC_IF_LEVEL   0x7F
 
#define TDA10048_DIG_AGC_LEVEL   0x81
 
#define TDA10048_FREQ_PHY2_LSB   0x86
 
#define TDA10048_FREQ_PHY2_MSB   0x87
 
#define TDA10048_TIME_INVWREF_LSB   0x88
 
#define TDA10048_TIME_INVWREF_MSB   0x89
 
#define TDA10048_TIME_WREF_LSB   0x8A
 
#define TDA10048_TIME_WREF_MID1   0x8B
 
#define TDA10048_TIME_WREF_MID2   0x8C
 
#define TDA10048_TIME_WREF_MSB   0x8D
 
#define TDA10048_NP_OUT   0xA2
 
#define TDA10048_CELL_ID_LSB   0xA4
 
#define TDA10048_CELL_ID_MSB   0xA5
 
#define TDA10048_EXTTPS_ODD   0xAA
 
#define TDA10048_EXTTPS_EVEN   0xAB
 
#define TDA10048_TPS_LENGTH   0xAC
 
#define TDA10048_FREE_REG_1   0xB2
 
#define TDA10048_FREE_REG_2   0xB3
 
#define TDA10048_CONF_C3_1   0xC0
 
#define TDA10048_CVBER_CTRL   0xC2
 
#define TDA10048_CBER_NMAX_LSB   0xC4
 
#define TDA10048_CBER_NMAX_MSB   0xC5
 
#define TDA10048_CBER_LSB   0xC6
 
#define TDA10048_CBER_MSB   0xC7
 
#define TDA10048_VBER_LSB   0xC8
 
#define TDA10048_VBER_MID   0xC9
 
#define TDA10048_VBER_MSB   0xCA
 
#define TDA10048_CVBER_LUT   0xCC
 
#define TDA10048_UNCOR_CTRL   0xCD
 
#define TDA10048_UNCOR_CPT_LSB   0xCE
 
#define TDA10048_UNCOR_CPT_MSB   0xCF
 
#define TDA10048_SOFT_IT_C3   0xD6
 
#define TDA10048_CONF_TS2   0xE0
 
#define TDA10048_CONF_TS1   0xE1
 
#define dprintk(level, fmt, arg...)
 

Functions

struct dvb_frontendtda10048_attach (const struct tda10048_config *config, struct i2c_adapter *i2c)
 
 EXPORT_SYMBOL (tda10048_attach)
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Enable verbose debug messages")
 
 MODULE_DESCRIPTION ("NXP TDA10048HN DVB-T Demodulator driver")
 
 MODULE_AUTHOR ("Steven Toth")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
do { if (debug >= level)\
printk(KERN_DEBUG "tda10048: " fmt, ## arg);\
} while (0)

Definition at line 134 of file tda10048.c.

#define TDA10048_AGC_CONF   0x70

Definition at line 87 of file tda10048.c.

#define TDA10048_AGC_GAINS   0x76

Definition at line 91 of file tda10048.c.

#define TDA10048_AGC_IF_LEVEL   0x7F

Definition at line 97 of file tda10048.c.

#define TDA10048_AGC_IF_MAX   0x7B

Definition at line 95 of file tda10048.c.

#define TDA10048_AGC_IF_MIN   0x7A

Definition at line 94 of file tda10048.c.

#define TDA10048_AGC_RENORM   0x74

Definition at line 90 of file tda10048.c.

#define TDA10048_AGC_THRESHOLD_LSB   0x72

Definition at line 88 of file tda10048.c.

#define TDA10048_AGC_THRESHOLD_MSB   0x73

Definition at line 89 of file tda10048.c.

#define TDA10048_AGC_TUN_LEVEL   0x7E

Definition at line 96 of file tda10048.c.

#define TDA10048_AGC_TUN_MAX   0x79

Definition at line 93 of file tda10048.c.

#define TDA10048_AGC_TUN_MIN   0x78

Definition at line 92 of file tda10048.c.

#define TDA10048_AUTO   0x18

Definition at line 48 of file tda10048.c.

#define TDA10048_CBER_LSB   0xC6

Definition at line 119 of file tda10048.c.

#define TDA10048_CBER_MSB   0xC7

Definition at line 120 of file tda10048.c.

#define TDA10048_CBER_NMAX_LSB   0xC4

Definition at line 117 of file tda10048.c.

#define TDA10048_CBER_NMAX_MSB   0xC5

Definition at line 118 of file tda10048.c.

#define TDA10048_CELL_ID_LSB   0xA4

Definition at line 108 of file tda10048.c.

#define TDA10048_CELL_ID_MSB   0xA5

Definition at line 109 of file tda10048.c.

#define TDA10048_CHANNEL_INFO1   0x24

Definition at line 55 of file tda10048.c.

#define TDA10048_CHANNEL_INFO1_R   0x22

Definition at line 53 of file tda10048.c.

#define TDA10048_CHANNEL_INFO2   0x25

Definition at line 56 of file tda10048.c.

#define TDA10048_CHANNEL_INFO2_R   0x23

Definition at line 54 of file tda10048.c.

#define TDA10048_CODE_IN_RAM   0x20

Definition at line 52 of file tda10048.c.

#define TDA10048_CONF_ADC   0x54

Definition at line 83 of file tda10048.c.

#define TDA10048_CONF_ADC_2   0x55

Definition at line 84 of file tda10048.c.

#define TDA10048_CONF_C1_1   0x60

Definition at line 85 of file tda10048.c.

#define TDA10048_CONF_C1_3   0x62

Definition at line 86 of file tda10048.c.

#define TDA10048_CONF_C3_1   0xC0

Definition at line 115 of file tda10048.c.

#define TDA10048_CONF_C4_1   0x1E

Definition at line 50 of file tda10048.c.

#define TDA10048_CONF_C4_2   0x1F

Definition at line 51 of file tda10048.c.

#define TDA10048_CONF_PLL1   0x51

Definition at line 80 of file tda10048.c.

#define TDA10048_CONF_PLL2   0x52

Definition at line 81 of file tda10048.c.

#define TDA10048_CONF_PLL3   0x53

Definition at line 82 of file tda10048.c.

#define TDA10048_CONF_POLARITY   0x46

Definition at line 71 of file tda10048.c.

#define TDA10048_CONF_TRISTATE1   0x44

Definition at line 69 of file tda10048.c.

#define TDA10048_CONF_TRISTATE2   0x45

Definition at line 70 of file tda10048.c.

#define TDA10048_CONF_TS1   0xE1

Definition at line 130 of file tda10048.c.

#define TDA10048_CONF_TS2   0xE0

Definition at line 129 of file tda10048.c.

#define TDA10048_CONF_XO   0x50

Definition at line 79 of file tda10048.c.

#define TDA10048_CVBER_CTRL   0xC2

Definition at line 116 of file tda10048.c.

#define TDA10048_CVBER_LUT   0xCC

Definition at line 124 of file tda10048.c.

#define TDA10048_DEFAULT_FIRMWARE   "dvb-fe-tda10048-1.0.fw"

Definition at line 34 of file tda10048.c.

#define TDA10048_DEFAULT_FIRMWARE_SIZE   24878

Definition at line 35 of file tda10048.c.

#define TDA10048_DIG_AGC_LEVEL   0x81

Definition at line 98 of file tda10048.c.

#define TDA10048_DSP_AD_LSB   0x3C

Definition at line 65 of file tda10048.c.

#define TDA10048_DSP_AD_MSB   0x3D

Definition at line 66 of file tda10048.c.

#define TDA10048_DSP_CODE_CPT   0x0C

Definition at line 40 of file tda10048.c.

#define TDA10048_DSP_CODE_IN   0x0E

Definition at line 41 of file tda10048.c.

#define TDA10048_DSP_REG_LSB   0x3E

Definition at line 67 of file tda10048.c.

#define TDA10048_DSP_REG_MSB   0x3F

Definition at line 68 of file tda10048.c.

#define TDA10048_EXTTPS_EVEN   0xAB

Definition at line 111 of file tda10048.c.

#define TDA10048_EXTTPS_ODD   0xAA

Definition at line 110 of file tda10048.c.

#define TDA10048_FREE_REG_1   0xB2

Definition at line 113 of file tda10048.c.

#define TDA10048_FREE_REG_2   0xB3

Definition at line 114 of file tda10048.c.

#define TDA10048_FREQ_ERROR_LSB   0x2A

Definition at line 61 of file tda10048.c.

#define TDA10048_FREQ_ERROR_LSB_R   0x28

Definition at line 59 of file tda10048.c.

#define TDA10048_FREQ_ERROR_MSB   0x2B

Definition at line 62 of file tda10048.c.

#define TDA10048_FREQ_ERROR_MSB_R   0x29

Definition at line 60 of file tda10048.c.

#define TDA10048_FREQ_PHY2_LSB   0x86

Definition at line 99 of file tda10048.c.

#define TDA10048_FREQ_PHY2_MSB   0x87

Definition at line 100 of file tda10048.c.

#define TDA10048_GPIO_OUT_SEL   0x4C

Definition at line 76 of file tda10048.c.

#define TDA10048_GPIO_SELECT   0x4D

Definition at line 77 of file tda10048.c.

#define TDA10048_GPIO_SP_DS0   0x48

Definition at line 72 of file tda10048.c.

#define TDA10048_GPIO_SP_DS1   0x49

Definition at line 73 of file tda10048.c.

#define TDA10048_GPIO_SP_DS2   0x4A

Definition at line 74 of file tda10048.c.

#define TDA10048_GPIO_SP_DS3   0x4B

Definition at line 75 of file tda10048.c.

#define TDA10048_IC_MODE   0x4E

Definition at line 78 of file tda10048.c.

#define TDA10048_IDENTITY   0x00

Definition at line 38 of file tda10048.c.

#define TDA10048_IN_CONF1   0x10

Definition at line 42 of file tda10048.c.

#define TDA10048_IN_CONF2   0x11

Definition at line 43 of file tda10048.c.

#define TDA10048_IN_CONF3   0x12

Definition at line 44 of file tda10048.c.

#define TDA10048_IT_SEL   0x30

Definition at line 63 of file tda10048.c.

#define TDA10048_IT_STAT   0x32

Definition at line 64 of file tda10048.c.

#define TDA10048_NP_OUT   0xA2

Definition at line 107 of file tda10048.c.

#define TDA10048_OUT_CONF1   0x14

Definition at line 45 of file tda10048.c.

#define TDA10048_OUT_CONF2   0x15

Definition at line 46 of file tda10048.c.

#define TDA10048_OUT_CONF3   0x16

Definition at line 47 of file tda10048.c.

#define TDA10048_SOFT_IT_C3   0xD6

Definition at line 128 of file tda10048.c.

#define TDA10048_SYNC_STATUS   0x1A

Definition at line 49 of file tda10048.c.

#define TDA10048_TIME_ERROR   0x27

Definition at line 58 of file tda10048.c.

#define TDA10048_TIME_ERROR_R   0x26

Definition at line 57 of file tda10048.c.

#define TDA10048_TIME_INVWREF_LSB   0x88

Definition at line 101 of file tda10048.c.

#define TDA10048_TIME_INVWREF_MSB   0x89

Definition at line 102 of file tda10048.c.

#define TDA10048_TIME_WREF_LSB   0x8A

Definition at line 103 of file tda10048.c.

#define TDA10048_TIME_WREF_MID1   0x8B

Definition at line 104 of file tda10048.c.

#define TDA10048_TIME_WREF_MID2   0x8C

Definition at line 105 of file tda10048.c.

#define TDA10048_TIME_WREF_MSB   0x8D

Definition at line 106 of file tda10048.c.

#define TDA10048_TPS_LENGTH   0xAC

Definition at line 112 of file tda10048.c.

#define TDA10048_UNCOR_CPT_LSB   0xCE

Definition at line 126 of file tda10048.c.

#define TDA10048_UNCOR_CPT_MSB   0xCF

Definition at line 127 of file tda10048.c.

#define TDA10048_UNCOR_CTRL   0xCD

Definition at line 125 of file tda10048.c.

#define TDA10048_VBER_LSB   0xC8

Definition at line 121 of file tda10048.c.

#define TDA10048_VBER_MID   0xC9

Definition at line 122 of file tda10048.c.

#define TDA10048_VBER_MSB   0xCA

Definition at line 123 of file tda10048.c.

#define TDA10048_VERSION   0x01

Definition at line 39 of file tda10048.c.

Function Documentation

EXPORT_SYMBOL ( tda10048_attach  )
MODULE_AUTHOR ( "Steven Toth"  )
MODULE_DESCRIPTION ( "NXP TDA10048HN DVB-T Demodulator driver )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"Enable verbose debug messages"   
)
struct dvb_frontend* tda10048_attach ( const struct tda10048_config config,
struct i2c_adapter i2c 
)
read

Definition at line 1099 of file tda10048.c.