Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
radio-tea5764.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>

Go to the source code of this file.

Data Structures

struct  tea5764_regs
 
struct  tea5764_write_regs
 
struct  tea5764_device
 

Macros

#define DRIVER_VERSION   "0.0.2"
 
#define DRIVER_AUTHOR   "Fabio Belavenuto <[email protected]>"
 
#define DRIVER_DESC   "A driver for the TEA5764 radio chip for EZX Phones."
 
#define PINFO(format,...)
 
#define PWARN(format,...)
 
#define PDEBUG(format,...)
 
#define FREQ_MIN   87500
 
#define FREQ_MAX   108000
 
#define FREQ_MUL   16
 
#define TEA5764_MANID   0x002b
 
#define TEA5764_CHIPID   0x5764
 
#define TEA5764_INTREG_BLMSK   0x0001
 
#define TEA5764_INTREG_FRRMSK   0x0002
 
#define TEA5764_INTREG_LEVMSK   0x0008
 
#define TEA5764_INTREG_IFMSK   0x0010
 
#define TEA5764_INTREG_BLMFLAG   0x0100
 
#define TEA5764_INTREG_FRRFLAG   0x0200
 
#define TEA5764_INTREG_LEVFLAG   0x0800
 
#define TEA5764_INTREG_IFFLAG   0x1000
 
#define TEA5764_FRQSET_SUD   0x8000
 
#define TEA5764_FRQSET_SM   0x4000
 
#define TEA5764_TNCTRL_PUPD1   0x8000
 
#define TEA5764_TNCTRL_PUPD0   0x4000
 
#define TEA5764_TNCTRL_BLIM   0x2000
 
#define TEA5764_TNCTRL_SWPM   0x1000
 
#define TEA5764_TNCTRL_IFCTC   0x0800
 
#define TEA5764_TNCTRL_AFM   0x0400
 
#define TEA5764_TNCTRL_SMUTE   0x0200
 
#define TEA5764_TNCTRL_SNC   0x0100
 
#define TEA5764_TNCTRL_MU   0x0080
 
#define TEA5764_TNCTRL_SSL1   0x0040
 
#define TEA5764_TNCTRL_SSL0   0x0020
 
#define TEA5764_TNCTRL_HLSI   0x0010
 
#define TEA5764_TNCTRL_MST   0x0008
 
#define TEA5764_TNCTRL_SWP   0x0004
 
#define TEA5764_TNCTRL_DTC   0x0002
 
#define TEA5764_TNCTRL_AHLSI   0x0001
 
#define TEA5764_TUNCHK_LEVEL(x)   (((x) & 0x00F0) >> 4)
 
#define TEA5764_TUNCHK_IFCNT(x)   (((x) & 0xFE00) >> 9)
 
#define TEA5764_TUNCHK_TUNTO   0x0100
 
#define TEA5764_TUNCHK_LD   0x0008
 
#define TEA5764_TUNCHK_STEREO   0x0004
 
#define TEA5764_TESTREG_TRIGFR   0x0800
 
#define RADIO_TEA5764_XTAL   0
 

Functions

struct tea5764_regs __attribute__ ((packed))
 
int tea5764_i2c_read (struct tea5764_device *radio)
 
int tea5764_i2c_write (struct tea5764_device *radio)
 
 MODULE_DEVICE_TABLE (i2c, tea5764_id)
 
 module_i2c_driver (tea5764_i2c_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRIVER_VERSION)
 
 module_param (use_xtal, int, 0)
 
 MODULE_PARM_DESC (use_xtal,"Chip have a xtal connected in board")
 
 module_param (radio_nr, int, 0)
 
 MODULE_PARM_DESC (radio_nr,"video4linux device number to use")
 

Variables

u16 intreg
 
u16 frqset
 
u16 tnctrl
 
u16 frqchk
 
u16 tunchk
 
u16 testreg
 
u16 rdsstat
 
u16 rdslb
 
u16 rdspb
 
u16 rdsbc
 
u16 rdsctrl
 
u16 rdsbbl
 
u16 manid
 
u16 chipid
 
struct tea5764_device __attribute__
 

Macro Definition Documentation

#define DRIVER_AUTHOR   "Fabio Belavenuto <[email protected]>"

Definition at line 45 of file radio-tea5764.c.

#define DRIVER_DESC   "A driver for the TEA5764 radio chip for EZX Phones."

Definition at line 46 of file radio-tea5764.c.

#define DRIVER_VERSION   "0.0.2"

Definition at line 43 of file radio-tea5764.c.

#define FREQ_MAX   108000

Definition at line 61 of file radio-tea5764.c.

#define FREQ_MIN   87500

Definition at line 60 of file radio-tea5764.c.

#define FREQ_MUL   16

Definition at line 62 of file radio-tea5764.c.

#define PDEBUG (   format,
  ... 
)
Value:
printk(KERN_DEBUG KBUILD_MODNAME ": "\
DRIVER_VERSION ": " format "\n", ## __VA_ARGS__)

Definition at line 54 of file radio-tea5764.c.

#define PINFO (   format,
  ... 
)
Value:
printk(KERN_INFO KBUILD_MODNAME ": "\
DRIVER_VERSION ": " format "\n", ## __VA_ARGS__)

Definition at line 48 of file radio-tea5764.c.

#define PWARN (   format,
  ... 
)
Value:
printk(KERN_WARNING KBUILD_MODNAME ": "\
DRIVER_VERSION ": " format "\n", ## __VA_ARGS__)

Definition at line 51 of file radio-tea5764.c.

#define RADIO_TEA5764_XTAL   0

Definition at line 134 of file radio-tea5764.c.

#define TEA5764_CHIPID   0x5764

Definition at line 66 of file radio-tea5764.c.

#define TEA5764_FRQSET_SM   0x4000

Definition at line 78 of file radio-tea5764.c.

#define TEA5764_FRQSET_SUD   0x8000

Definition at line 77 of file radio-tea5764.c.

#define TEA5764_INTREG_BLMFLAG   0x0100

Definition at line 72 of file radio-tea5764.c.

#define TEA5764_INTREG_BLMSK   0x0001

Definition at line 68 of file radio-tea5764.c.

#define TEA5764_INTREG_FRRFLAG   0x0200

Definition at line 73 of file radio-tea5764.c.

#define TEA5764_INTREG_FRRMSK   0x0002

Definition at line 69 of file radio-tea5764.c.

#define TEA5764_INTREG_IFFLAG   0x1000

Definition at line 75 of file radio-tea5764.c.

#define TEA5764_INTREG_IFMSK   0x0010

Definition at line 71 of file radio-tea5764.c.

#define TEA5764_INTREG_LEVFLAG   0x0800

Definition at line 74 of file radio-tea5764.c.

#define TEA5764_INTREG_LEVMSK   0x0008

Definition at line 70 of file radio-tea5764.c.

#define TEA5764_MANID   0x002b

Definition at line 65 of file radio-tea5764.c.

#define TEA5764_TESTREG_TRIGFR   0x0800

Definition at line 103 of file radio-tea5764.c.

#define TEA5764_TNCTRL_AFM   0x0400

Definition at line 85 of file radio-tea5764.c.

#define TEA5764_TNCTRL_AHLSI   0x0001

Definition at line 95 of file radio-tea5764.c.

#define TEA5764_TNCTRL_BLIM   0x2000

Definition at line 82 of file radio-tea5764.c.

#define TEA5764_TNCTRL_DTC   0x0002

Definition at line 94 of file radio-tea5764.c.

#define TEA5764_TNCTRL_HLSI   0x0010

Definition at line 91 of file radio-tea5764.c.

#define TEA5764_TNCTRL_IFCTC   0x0800

Definition at line 84 of file radio-tea5764.c.

#define TEA5764_TNCTRL_MST   0x0008

Definition at line 92 of file radio-tea5764.c.

#define TEA5764_TNCTRL_MU   0x0080

Definition at line 88 of file radio-tea5764.c.

#define TEA5764_TNCTRL_PUPD0   0x4000

Definition at line 81 of file radio-tea5764.c.

#define TEA5764_TNCTRL_PUPD1   0x8000

Definition at line 80 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SMUTE   0x0200

Definition at line 86 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SNC   0x0100

Definition at line 87 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SSL0   0x0020

Definition at line 90 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SSL1   0x0040

Definition at line 89 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SWP   0x0004

Definition at line 93 of file radio-tea5764.c.

#define TEA5764_TNCTRL_SWPM   0x1000

Definition at line 83 of file radio-tea5764.c.

#define TEA5764_TUNCHK_IFCNT (   x)    (((x) & 0xFE00) >> 9)

Definition at line 98 of file radio-tea5764.c.

#define TEA5764_TUNCHK_LD   0x0008

Definition at line 100 of file radio-tea5764.c.

#define TEA5764_TUNCHK_LEVEL (   x)    (((x) & 0x00F0) >> 4)

Definition at line 97 of file radio-tea5764.c.

#define TEA5764_TUNCHK_STEREO   0x0004

Definition at line 101 of file radio-tea5764.c.

#define TEA5764_TUNCHK_TUNTO   0x0100

Definition at line 99 of file radio-tea5764.c.

Function Documentation

struct tea5764_regs __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( i2c  ,
tea5764_id   
)
module_i2c_driver ( tea5764_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
module_param ( use_xtal  ,
int  ,
 
)
module_param ( radio_nr  ,
int  ,
 
)
MODULE_PARM_DESC ( use_xtal  ,
"Chip have a xtal connected in board  
)
MODULE_PARM_DESC ( radio_nr  ,
"video4linux device number to use"   
)
MODULE_VERSION ( DRIVER_VERSION  )
int tea5764_i2c_read ( struct tea5764_device radio)

Definition at line 148 of file radio-tea5764.c.

int tea5764_i2c_write ( struct tea5764_device radio)

Definition at line 168 of file radio-tea5764.c.

Variable Documentation

u16 chipid

Definition at line 134 of file radio-tea5764.c.

u16 frqchk

Definition at line 124 of file radio-tea5764.c.

u16 frqset

Definition at line 122 of file radio-tea5764.c.

u8 intreg

Definition at line 121 of file radio-tea5764.c.

u16 manid

Definition at line 133 of file radio-tea5764.c.

u16 rdsbbl

Definition at line 132 of file radio-tea5764.c.

u16 rdsbc

Definition at line 130 of file radio-tea5764.c.

u16 rdsctrl

Definition at line 131 of file radio-tea5764.c.

u16 rdslb

Definition at line 128 of file radio-tea5764.c.

u16 rdspb

Definition at line 129 of file radio-tea5764.c.

u16 rdsstat

Definition at line 127 of file radio-tea5764.c.

u16 testreg

Definition at line 126 of file radio-tea5764.c.

u16 tnctrl

Definition at line 123 of file radio-tea5764.c.

u16 tunchk

Definition at line 125 of file radio-tea5764.c.