Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cx25840-core.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/math64.h>
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/cx25840.h>
#include "cx25840-core.h"

Go to the source code of this file.

Macros

#define CX25840_VID_INT_STAT_REG   0x410
 
#define CX25840_VID_INT_STAT_BITS   0x0000ffff
 
#define CX25840_VID_INT_MASK_BITS   0xffff0000
 
#define CX25840_VID_INT_MASK_SHFT   16
 
#define CX25840_VID_INT_MASK_REG   0x412
 
#define CX23885_AUD_MC_INT_MASK_REG   0x80c
 
#define CX23885_AUD_MC_INT_STAT_BITS   0xffff0000
 
#define CX23885_AUD_MC_INT_CTRL_BITS   0x0000ffff
 
#define CX23885_AUD_MC_INT_STAT_SHFT   16
 
#define CX25840_AUD_INT_CTRL_REG   0x812
 
#define CX25840_AUD_INT_STAT_REG   0x813
 
#define CX23885_PIN_CTRL_IRQ_REG   0x123
 
#define CX23885_PIN_CTRL_IRQ_IR_STAT   0x40
 
#define CX23885_PIN_CTRL_IRQ_AUD_STAT   0x20
 
#define CX23885_PIN_CTRL_IRQ_VID_STAT   0x10
 
#define CX25840_IR_STATS_REG   0x210
 
#define CX25840_IR_IRQEN_REG   0x214
 
#define AFE_CTRL   (0x104)
 
#define MODE_CTRL   (0x400)
 
#define DIF_PLL_FREQ_WORD   (0x300)
 
#define DIF_BPF_COEFF01   (0x348)
 
#define DIF_BPF_COEFF23   (0x34c)
 
#define DIF_BPF_COEFF45   (0x350)
 
#define DIF_BPF_COEFF67   (0x354)
 
#define DIF_BPF_COEFF89   (0x358)
 
#define DIF_BPF_COEFF1011   (0x35c)
 
#define DIF_BPF_COEFF1213   (0x360)
 
#define DIF_BPF_COEFF1415   (0x364)
 
#define DIF_BPF_COEFF1617   (0x368)
 
#define DIF_BPF_COEFF1819   (0x36c)
 
#define DIF_BPF_COEFF2021   (0x370)
 
#define DIF_BPF_COEFF2223   (0x374)
 
#define DIF_BPF_COEFF2425   (0x378)
 
#define DIF_BPF_COEFF2627   (0x37c)
 
#define DIF_BPF_COEFF2829   (0x380)
 
#define DIF_BPF_COEFF3031   (0x384)
 
#define DIF_BPF_COEFF3233   (0x388)
 
#define DIF_BPF_COEFF3435   (0x38c)
 
#define DIF_BPF_COEFF36   (0x390)
 

Functions

 MODULE_DESCRIPTION ("Conexant CX25840 audio/video decoder driver")
 
 MODULE_AUTHOR ("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (debug, cx25840_debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Debugging messages [0=Off (default) 1=On]")
 
int cx25840_write (struct i2c_client *client, u16 addr, u8 value)
 
int cx25840_write4 (struct i2c_client *client, u16 addr, u32 value)
 
u8 cx25840_read (struct i2c_client *client, u16 addr)
 
u32 cx25840_read4 (struct i2c_client *client, u16 addr)
 
int cx25840_and_or (struct i2c_client *client, u16 addr, unsigned and_mask, u8 or_value)
 
int cx25840_and_or4 (struct i2c_client *client, u16 addr, u32 and_mask, u32 or_value)
 
void cx25840_std_setup (struct i2c_client *client)
 
void cx23885_dif_setup (struct i2c_client *client, u32 ifHz)
 
 MODULE_DEVICE_TABLE (i2c, cx25840_id)
 
 module_i2c_driver (cx25840_driver)
 

Macro Definition Documentation

#define AFE_CTRL   (0x104)
#define CX23885_AUD_MC_INT_CTRL_BITS   0x0000ffff

Definition at line 65 of file cx25840-core.c.

#define CX23885_AUD_MC_INT_MASK_REG   0x80c

Definition at line 63 of file cx25840-core.c.

#define CX23885_AUD_MC_INT_STAT_BITS   0xffff0000

Definition at line 64 of file cx25840-core.c.

#define CX23885_AUD_MC_INT_STAT_SHFT   16

Definition at line 66 of file cx25840-core.c.

#define CX23885_PIN_CTRL_IRQ_AUD_STAT   0x20

Definition at line 73 of file cx25840-core.c.

#define CX23885_PIN_CTRL_IRQ_IR_STAT   0x40

Definition at line 72 of file cx25840-core.c.

#define CX23885_PIN_CTRL_IRQ_REG   0x123

Definition at line 71 of file cx25840-core.c.

#define CX23885_PIN_CTRL_IRQ_VID_STAT   0x10

Definition at line 74 of file cx25840-core.c.

#define CX25840_AUD_INT_CTRL_REG   0x812

Definition at line 68 of file cx25840-core.c.

#define CX25840_AUD_INT_STAT_REG   0x813

Definition at line 69 of file cx25840-core.c.

#define CX25840_IR_IRQEN_REG   0x214

Definition at line 77 of file cx25840-core.c.

#define CX25840_IR_STATS_REG   0x210

Definition at line 76 of file cx25840-core.c.

#define CX25840_VID_INT_MASK_BITS   0xffff0000

Definition at line 59 of file cx25840-core.c.

#define CX25840_VID_INT_MASK_REG   0x412

Definition at line 61 of file cx25840-core.c.

#define CX25840_VID_INT_MASK_SHFT   16

Definition at line 60 of file cx25840-core.c.

#define CX25840_VID_INT_STAT_BITS   0x0000ffff

Definition at line 58 of file cx25840-core.c.

#define CX25840_VID_INT_STAT_REG   0x410

Definition at line 57 of file cx25840-core.c.

#define DIF_BPF_COEFF01   (0x348)

Definition at line 2048 of file cx25840-core.c.

#define DIF_BPF_COEFF1011   (0x35c)

Definition at line 2053 of file cx25840-core.c.

#define DIF_BPF_COEFF1213   (0x360)

Definition at line 2054 of file cx25840-core.c.

#define DIF_BPF_COEFF1415   (0x364)

Definition at line 2055 of file cx25840-core.c.

#define DIF_BPF_COEFF1617   (0x368)

Definition at line 2056 of file cx25840-core.c.

#define DIF_BPF_COEFF1819   (0x36c)

Definition at line 2057 of file cx25840-core.c.

#define DIF_BPF_COEFF2021   (0x370)

Definition at line 2058 of file cx25840-core.c.

#define DIF_BPF_COEFF2223   (0x374)

Definition at line 2059 of file cx25840-core.c.

#define DIF_BPF_COEFF23   (0x34c)

Definition at line 2049 of file cx25840-core.c.

#define DIF_BPF_COEFF2425   (0x378)

Definition at line 2060 of file cx25840-core.c.

#define DIF_BPF_COEFF2627   (0x37c)

Definition at line 2061 of file cx25840-core.c.

#define DIF_BPF_COEFF2829   (0x380)

Definition at line 2062 of file cx25840-core.c.

#define DIF_BPF_COEFF3031   (0x384)

Definition at line 2063 of file cx25840-core.c.

#define DIF_BPF_COEFF3233   (0x388)

Definition at line 2064 of file cx25840-core.c.

#define DIF_BPF_COEFF3435   (0x38c)

Definition at line 2065 of file cx25840-core.c.

#define DIF_BPF_COEFF36   (0x390)

Definition at line 2066 of file cx25840-core.c.

#define DIF_BPF_COEFF45   (0x350)

Definition at line 2050 of file cx25840-core.c.

#define DIF_BPF_COEFF67   (0x354)

Definition at line 2051 of file cx25840-core.c.

#define DIF_BPF_COEFF89   (0x358)

Definition at line 2052 of file cx25840-core.c.

#define DIF_PLL_FREQ_WORD   (0x300)

Definition at line 2047 of file cx25840-core.c.

#define MODE_CTRL   (0x400)

Function Documentation

void cx23885_dif_setup ( struct i2c_client client,
u32  ifHz 
)

Definition at line 2068 of file cx25840-core.c.

int cx25840_and_or ( struct i2c_client client,
u16  addr,
unsigned  and_mask,
u8  or_value 
)

Definition at line 161 of file cx25840-core.c.

int cx25840_and_or4 ( struct i2c_client client,
u16  addr,
u32  and_mask,
u32  or_value 
)

Definition at line 169 of file cx25840-core.c.

u8 cx25840_read ( struct i2c_client client,
u16  addr 
)

Definition at line 110 of file cx25840-core.c.

u32 cx25840_read4 ( struct i2c_client client,
u16  addr 
)

Definition at line 135 of file cx25840-core.c.

void cx25840_std_setup ( struct i2c_client client)

Definition at line 774 of file cx25840-core.c.

int cx25840_write ( struct i2c_client client,
u16  addr,
u8  value 
)

Definition at line 89 of file cx25840-core.c.

int cx25840_write4 ( struct i2c_client client,
u16  addr,
u32  value 
)

Definition at line 98 of file cx25840-core.c.

MODULE_AUTHOR ( "Ulf  Eklund,
Chris  Kennedy,
Hans  Verkuil,
Tyler Trafford"   
)
MODULE_DESCRIPTION ( "Conexant CX25840 audio/video decoder driver )
MODULE_DEVICE_TABLE ( i2c  ,
cx25840_id   
)
module_i2c_driver ( cx25840_driver  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( debug  ,
cx25840_debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"Debugging messages "  [0=Off(default) 1=On] 
)