Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
drxd_hard.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/i2c.h>
#include <asm/div64.h>
#include "dvb_frontend.h"
#include "drxd.h"
#include "drxd_firm.h"

Go to the source code of this file.

Data Structures

struct  SCfgAgc
 
struct  SNoiseCal
 
struct  drxd_state
 

Macros

#define DRX_FW_FILENAME_A2   "drxd-a2-1.1.fw"
 
#define DRX_FW_FILENAME_B1   "drxd-b1-1.1.fw"
 
#define CHUNK_SIZE   48
 
#define DRX_I2C_RMW   0x10
 
#define DRX_I2C_BROADCAST   0x20
 
#define DRX_I2C_CLEARCRC   0x80
 
#define DRX_I2C_SINGLE_MASTER   0xC0
 
#define DRX_I2C_MODEFLAGS   0xC0
 
#define DRX_I2C_FLAGS   0xF0
 
#define SIZEOF_ARRAY(array)   (sizeof((array))/sizeof((array)[0]))
 
#define DEFAULT_LOCK_TIMEOUT   1100
 
#define DRX_CHANNEL_AUTO   0
 
#define DRX_CHANNEL_HIGH   1
 
#define DRX_CHANNEL_LOW   2
 
#define DRX_LOCK_MPEG   1
 
#define DRX_LOCK_FEC   2
 
#define DRX_LOCK_DEMOD   4
 
#define HI_TR_WRITE   0x9
 
#define HI_TR_READ   0xA
 
#define HI_TR_READ_WRITE   0xB
 
#define HI_TR_BROADCAST   0x4
 

Enumerations

enum  CSCDState { CSCD_INIT = 0, CSCD_SET, CSCD_SAVED }
 
enum  CDrxdState { DRXD_UNINITIALIZED = 0, DRXD_STOPPED, DRXD_STARTED }
 
enum  AGC_CTRL_MODE {
  AGC_CTRL_AUTO = 0, AGC_CTRL_USER, AGC_CTRL_OFF, DRXK_AGC_CTRL_AUTO = 0,
  DRXK_AGC_CTRL_USER, DRXK_AGC_CTRL_OFF
}
 
enum  OperationMode {
  OM_Default, OM_DVBT_Diversity_Front, OM_DVBT_Diversity_End, OM_NONE,
  OM_QAM_ITU_A, OM_QAM_ITU_B, OM_QAM_ITU_C, OM_DVBT
}
 
enum  app_env { APPENV_STATIC = 0, APPENV_PORTABLE = 1, APPENV_MOBILE = 2 }
 
enum  EIFFilter { IFFILTER_SAW = 0, IFFILTER_DISCRETE = 1 }
 

Functions

int SetOperationMode (struct drxd_state *state, int oMode)
 
int DRXD_init (struct drxd_state *state, const u8 *fw, u32 fw_size)
 
int DRXD_status (struct drxd_state *state, u32 *pLockStatus)
 
int drxd_config_i2c (struct dvb_frontend *fe, int onoff)
 
 EXPORT_SYMBOL (drxd_config_i2c)
 
struct dvb_frontenddrxd_attach (const struct drxd_config *config, void *priv, struct i2c_adapter *i2c, struct device *dev)
 
 EXPORT_SYMBOL (drxd_attach)
 
 MODULE_DESCRIPTION ("DRXD driver")
 
 MODULE_AUTHOR ("Micronas")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CHUNK_SIZE   48

Definition at line 40 of file drxd_hard.c.

#define DEFAULT_LOCK_TIMEOUT   1100

Definition at line 53 of file drxd_hard.c.

#define DRX_CHANNEL_AUTO   0

Definition at line 55 of file drxd_hard.c.

#define DRX_CHANNEL_HIGH   1

Definition at line 56 of file drxd_hard.c.

#define DRX_CHANNEL_LOW   2

Definition at line 57 of file drxd_hard.c.

#define DRX_FW_FILENAME_A2   "drxd-a2-1.1.fw"

Definition at line 37 of file drxd_hard.c.

#define DRX_FW_FILENAME_B1   "drxd-b1-1.1.fw"

Definition at line 38 of file drxd_hard.c.

#define DRX_I2C_BROADCAST   0x20

Definition at line 43 of file drxd_hard.c.

#define DRX_I2C_CLEARCRC   0x80

Definition at line 44 of file drxd_hard.c.

#define DRX_I2C_FLAGS   0xF0

Definition at line 47 of file drxd_hard.c.

#define DRX_I2C_MODEFLAGS   0xC0

Definition at line 46 of file drxd_hard.c.

#define DRX_I2C_RMW   0x10

Definition at line 42 of file drxd_hard.c.

#define DRX_I2C_SINGLE_MASTER   0xC0

Definition at line 45 of file drxd_hard.c.

#define DRX_LOCK_DEMOD   4

Definition at line 61 of file drxd_hard.c.

#define DRX_LOCK_FEC   2

Definition at line 60 of file drxd_hard.c.

#define DRX_LOCK_MPEG   1

Definition at line 59 of file drxd_hard.c.

#define HI_TR_BROADCAST   0x4

Definition at line 1062 of file drxd_hard.c.

#define HI_TR_READ   0xA

Definition at line 1060 of file drxd_hard.c.

#define HI_TR_READ_WRITE   0xB

Definition at line 1061 of file drxd_hard.c.

#define HI_TR_WRITE   0x9

Definition at line 1059 of file drxd_hard.c.

#define SIZEOF_ARRAY (   array)    (sizeof((array))/sizeof((array)[0]))

Definition at line 50 of file drxd_hard.c.

Enumeration Type Documentation

Enumerator:
AGC_CTRL_AUTO 
AGC_CTRL_USER 
AGC_CTRL_OFF 
DRXK_AGC_CTRL_AUTO 
DRXK_AGC_CTRL_USER 
DRXK_AGC_CTRL_OFF 

Definition at line 77 of file drxd_hard.c.

enum app_env
Enumerator:
APPENV_STATIC 
APPENV_PORTABLE 
APPENV_MOBILE 

Definition at line 109 of file drxd_hard.c.

enum CDrxdState
Enumerator:
DRXD_UNINITIALIZED 
DRXD_STOPPED 
DRXD_STARTED 

Definition at line 71 of file drxd_hard.c.

enum CSCDState
Enumerator:
CSCD_INIT 
CSCD_SET 
CSCD_SAVED 

Definition at line 65 of file drxd_hard.c.

enum EIFFilter
Enumerator:
IFFILTER_SAW 
IFFILTER_DISCRETE 

Definition at line 115 of file drxd_hard.c.

Enumerator:
OM_Default 
OM_DVBT_Diversity_Front 
OM_DVBT_Diversity_End 
OM_NONE 
OM_QAM_ITU_A 
OM_QAM_ITU_B 
OM_QAM_ITU_C 
OM_DVBT 

Definition at line 83 of file drxd_hard.c.

Function Documentation

struct dvb_frontend* drxd_attach ( const struct drxd_config config,
void priv,
struct i2c_adapter i2c,
struct device dev 
)
read

Definition at line 2955 of file drxd_hard.c.

int drxd_config_i2c ( struct dvb_frontend fe,
int  onoff 
)

Definition at line 2845 of file drxd_hard.c.

int DRXD_init ( struct drxd_state state,
const u8 fw,
u32  fw_size 
)

Definition at line 2615 of file drxd_hard.c.

int DRXD_status ( struct drxd_state state,
u32 pLockStatus 
)

Definition at line 2777 of file drxd_hard.c.

EXPORT_SYMBOL ( drxd_config_i2c  )
EXPORT_SYMBOL ( drxd_attach  )
MODULE_AUTHOR ( "Micronas"  )
MODULE_DESCRIPTION ( "DRXD driver )
MODULE_LICENSE ( "GPL"  )
int SetOperationMode ( struct drxd_state state,
int  oMode 
)

Definition at line 1751 of file drxd_hard.c.