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

Go to the source code of this file.

Data Structures

struct  stb0899_tab
 
struct  stb0899_params
 
struct  stb0899_internal
 
struct  stb0899_state
 

Macros

#define FE_ERROR   0
 
#define FE_NOTICE   1
 
#define FE_INFO   2
 
#define FE_DEBUG   3
 
#define FE_DEBUGREG   4
 
#define dprintk(x, y, z, format, arg...)
 
#define INRANGE(val, x, y)
 
#define BYTE0   0
 
#define BYTE1   8
 
#define BYTE2   16
 
#define BYTE3   24
 
#define GETBYTE(x, y)   (((x) >> (y)) & 0xff)
 
#define MAKEWORD32(a, b, c, d)   (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
 
#define MAKEWORD16(a, b)   (((a) << 8) | (b))
 
#define LSB(x)   ((x & 0xff))
 
#define MSB(y)   ((y >> 8) & 0xff)
 
#define STB0899_GETFIELD(bitf, val)   ((val >> STB0899_OFFST_##bitf) & ((1 << STB0899_WIDTH_##bitf) - 1))
 
#define STB0899_SETFIELD(mask, val, width, offset)
 
#define STB0899_SETFIELD_VAL(bitf, mask, val)
 
#define STB0899_READ_S2REG(DEVICE, REG)   (_stb0899_read_s2reg(state, DEVICE, STB0899_BASE_##REG, STB0899_OFF0_##REG))
 

Enumerations

enum  stb0899_status {
  NOAGC1 = 0, AGC1OK, NOTIMING, ANALOGCARRIER,
  TIMINGOK, NOAGC2, AGC2OK, NOCARRIER,
  CARRIEROK, NODATA, FALSELOCK, DATAOK,
  OUTOFRANGE, RANGEOK, DVBS2_DEMOD_LOCK, DVBS2_DEMOD_NOLOCK,
  DVBS2_FEC_LOCK, DVBS2_FEC_NOLOCK
}
 
enum  stb0899_modcod {
  STB0899_DUMMY_PLF, STB0899_QPSK_14, STB0899_QPSK_13, STB0899_QPSK_25,
  STB0899_QPSK_12, STB0899_QPSK_35, STB0899_QPSK_23, STB0899_QPSK_34,
  STB0899_QPSK_45, STB0899_QPSK_56, STB0899_QPSK_89, STB0899_QPSK_910,
  STB0899_8PSK_35, STB0899_8PSK_23, STB0899_8PSK_34, STB0899_8PSK_56,
  STB0899_8PSK_89, STB0899_8PSK_910, STB0899_16APSK_23, STB0899_16APSK_34,
  STB0899_16APSK_45, STB0899_16APSK_56, STB0899_16APSK_89, STB0899_16APSK_910,
  STB0899_32APSK_34, STB0899_32APSK_45, STB0899_32APSK_56, STB0899_32APSK_89,
  STB0899_32APSK_910
}
 
enum  stb0899_frame { STB0899_LONG_FRAME, STB0899_SHORT_FRAME }
 
enum  stb0899_alpha { RRC_20, RRC_25, RRC_35 }
 
enum  stb0899_fec {
  STB0899_FEC_1_2 = 13, STB0899_FEC_2_3 = 18, STB0899_FEC_3_4 = 21, STB0899_FEC_5_6 = 24,
  STB0899_FEC_6_7 = 25, STB0899_FEC_7_8 = 26
}
 

Functions

int stb0899_read_reg (struct stb0899_state *state, unsigned int reg)
 
u32 _stb0899_read_s2reg (struct stb0899_state *state, u32 stb0899_i2cdev, u32 stb0899_base_addr, u16 stb0899_reg_offset)
 
int stb0899_read_regs (struct stb0899_state *state, unsigned int reg, u8 *buf, u32 count)
 
int stb0899_write_regs (struct stb0899_state *state, unsigned int reg, u8 *data, u32 count)
 
int stb0899_write_reg (struct stb0899_state *state, unsigned int reg, u8 data)
 
int stb0899_write_s2reg (struct stb0899_state *state, u32 stb0899_i2cdev, u32 stb0899_base_addr, u16 stb0899_reg_offset, u32 stb0899_data)
 
int stb0899_i2c_gate_ctrl (struct dvb_frontend *fe, int enable)
 
enum stb0899_status stb0899_dvbs_algo (struct stb0899_state *state)
 
enum stb0899_status stb0899_dvbs2_algo (struct stb0899_state *state)
 
long stb0899_carr_width (struct stb0899_state *state)
 

Macro Definition Documentation

#define BYTE0   0

Definition at line 53 of file stb0899_priv.h.

#define BYTE1   8

Definition at line 54 of file stb0899_priv.h.

#define BYTE2   16

Definition at line 55 of file stb0899_priv.h.

#define BYTE3   24

Definition at line 56 of file stb0899_priv.h.

#define dprintk (   x,
  y,
  z,
  format,
  arg... 
)
Value:
do { \
if (z) { \
if ((*x > FE_ERROR) && (*x > y)) \
printk(KERN_ERR "%s: " format "\n", __func__ , ##arg); \
else if ((*x > FE_NOTICE) && (*x > y)) \
printk(KERN_NOTICE "%s: " format "\n", __func__ , ##arg); \
else if ((*x > FE_INFO) && (*x > y)) \
printk(KERN_INFO "%s: " format "\n", __func__ , ##arg); \
else if ((*x > FE_DEBUG) && (*x > y)) \
printk(KERN_DEBUG "%s: " format "\n", __func__ , ##arg); \
} else { \
if (*x > y) \
printk(format, ##arg); \
} \
} while(0)

Definition at line 34 of file stb0899_priv.h.

#define FE_DEBUG   3

Definition at line 31 of file stb0899_priv.h.

#define FE_DEBUGREG   4

Definition at line 32 of file stb0899_priv.h.

#define FE_ERROR   0

Definition at line 28 of file stb0899_priv.h.

#define FE_INFO   2

Definition at line 30 of file stb0899_priv.h.

#define FE_NOTICE   1

Definition at line 29 of file stb0899_priv.h.

#define GETBYTE (   x,
  y 
)    (((x) >> (y)) & 0xff)

Definition at line 58 of file stb0899_priv.h.

#define INRANGE (   val,
  x,
  y 
)
Value:
(((x <= val) && (val <= y)) || \
((y <= val) && (val <= x)) ? 1 : 0)

Definition at line 50 of file stb0899_priv.h.

#define LSB (   x)    ((x & 0xff))

Definition at line 62 of file stb0899_priv.h.

#define MAKEWORD16 (   a,
  b 
)    (((a) << 8) | (b))

Definition at line 60 of file stb0899_priv.h.

#define MAKEWORD32 (   a,
  b,
  c,
  d 
)    (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))

Definition at line 59 of file stb0899_priv.h.

#define MSB (   y)    ((y >> 8) & 0xff)

Definition at line 63 of file stb0899_priv.h.

#define STB0899_GETFIELD (   bitf,
  val 
)    ((val >> STB0899_OFFST_##bitf) & ((1 << STB0899_WIDTH_##bitf) - 1))

Definition at line 66 of file stb0899_priv.h.

#define STB0899_READ_S2REG (   DEVICE,
  REG 
)    (_stb0899_read_s2reg(state, DEVICE, STB0899_BASE_##REG, STB0899_OFF0_##REG))

Definition at line 255 of file stb0899_priv.h.

#define STB0899_SETFIELD (   mask,
  val,
  width,
  offset 
)
Value:
(mask & (~(((1 << width) - 1) << \
offset))) | ((val & \
((1 << width) - 1)) << offset)

Definition at line 69 of file stb0899_priv.h.

#define STB0899_SETFIELD_VAL (   bitf,
  mask,
  val 
)
Value:
(mask = (mask & (~(((1 << STB0899_WIDTH_##bitf) - 1) <<\
STB0899_OFFST_##bitf))) | \
(val << STB0899_OFFST_##bitf))

Definition at line 73 of file stb0899_priv.h.

Enumeration Type Documentation

Enumerator:
RRC_20 
RRC_25 
RRC_35 

Definition at line 136 of file stb0899_priv.h.

Enumerator:
STB0899_FEC_1_2 
STB0899_FEC_2_3 
STB0899_FEC_3_4 
STB0899_FEC_5_6 
STB0899_FEC_6_7 
STB0899_FEC_7_8 

Definition at line 147 of file stb0899_priv.h.

Enumerator:
STB0899_LONG_FRAME 
STB0899_SHORT_FRAME 

Definition at line 131 of file stb0899_priv.h.

Enumerator:
STB0899_DUMMY_PLF 
STB0899_QPSK_14 
STB0899_QPSK_13 
STB0899_QPSK_25 
STB0899_QPSK_12 
STB0899_QPSK_35 
STB0899_QPSK_23 
STB0899_QPSK_34 
STB0899_QPSK_45 
STB0899_QPSK_56 
STB0899_QPSK_89 
STB0899_QPSK_910 
STB0899_8PSK_35 
STB0899_8PSK_23 
STB0899_8PSK_34 
STB0899_8PSK_56 
STB0899_8PSK_89 
STB0899_8PSK_910 
STB0899_16APSK_23 
STB0899_16APSK_34 
STB0899_16APSK_45 
STB0899_16APSK_56 
STB0899_16APSK_89 
STB0899_16APSK_910 
STB0899_32APSK_34 
STB0899_32APSK_45 
STB0899_32APSK_56 
STB0899_32APSK_89 
STB0899_32APSK_910 

Definition at line 99 of file stb0899_priv.h.

Enumerator:
NOAGC1 
AGC1OK 
NOTIMING 
ANALOGCARRIER 
TIMINGOK 
NOAGC2 
AGC2OK 
NOCARRIER 
CARRIEROK 
NODATA 
FALSELOCK 
DATAOK 
OUTOFRANGE 
RANGEOK 
DVBS2_DEMOD_LOCK 
DVBS2_DEMOD_NOLOCK 
DVBS2_FEC_LOCK 
DVBS2_FEC_NOLOCK 

Definition at line 78 of file stb0899_priv.h.

Function Documentation

u32 _stb0899_read_s2reg ( struct stb0899_state state,
u32  stb0899_i2cdev,
u32  stb0899_base_addr,
u16  stb0899_reg_offset 
)

Definition at line 275 of file stb0899_drv.c.

long stb0899_carr_width ( struct stb0899_state state)

Definition at line 131 of file stb0899_algo.c.

enum stb0899_status stb0899_dvbs2_algo ( struct stb0899_state state)

Definition at line 1306 of file stb0899_algo.c.

enum stb0899_status stb0899_dvbs_algo ( struct stb0899_state state)

Definition at line 492 of file stb0899_algo.c.

int stb0899_i2c_gate_ctrl ( struct dvb_frontend fe,
int  enable 
)

Definition at line 1227 of file stb0899_drv.c.

int stb0899_read_reg ( struct stb0899_state state,
unsigned int  reg 
)

Definition at line 258 of file stb0899_drv.c.

int stb0899_read_regs ( struct stb0899_state state,
unsigned int  reg,
u8 buf,
u32  count 
)

Definition at line 448 of file stb0899_drv.c.

int stb0899_write_reg ( struct stb0899_state state,
unsigned int  reg,
u8  data 
)

Definition at line 542 of file stb0899_drv.c.

int stb0899_write_regs ( struct stb0899_state state,
unsigned int  reg,
u8 data,
u32  count 
)

Definition at line 499 of file stb0899_drv.c.

int stb0899_write_s2reg ( struct stb0899_state state,
u32  stb0899_i2cdev,
u32  stb0899_base_addr,
u16  stb0899_reg_offset,
u32  stb0899_data 
)

Definition at line 375 of file stb0899_drv.c.