Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
radio-si470x-i2c.c File Reference
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include "radio-si470x.h"

Go to the source code of this file.

Macros

#define DRIVER_AUTHOR   "Joonyoung Shim <[email protected]>";
 
#define DRIVER_CARD   "Silicon Labs Si470x FM Radio Receiver"
 
#define DRIVER_DESC   "I2C radio driver for Si470x FM Radio Receivers"
 
#define DRIVER_VERSION   "1.0.2"
 
#define WRITE_REG_NUM   8
 
#define WRITE_INDEX(i)   (i + 0x02)
 
#define READ_REG_NUM   RADIO_REGISTER_NUM
 
#define READ_INDEX(i)   ((i + RADIO_REGISTER_NUM - 0x0a) % READ_REG_NUM)
 

Functions

 MODULE_DEVICE_TABLE (i2c, si470x_i2c_id)
 
 module_param (radio_nr, int, 0444)
 
 MODULE_PARM_DESC (radio_nr,"Radio Nr")
 
 module_param (rds_buf, uint, 0444)
 
 MODULE_PARM_DESC (rds_buf,"RDS buffer entries: *100*")
 
 module_param (max_rds_errors, ushort, 0644)
 
 MODULE_PARM_DESC (max_rds_errors,"RDS maximum block errors: *1*")
 
int si470x_get_register (struct si470x_device *radio, int regnr)
 
int si470x_set_register (struct si470x_device *radio, int regnr)
 
int si470x_fops_open (struct file *file)
 
int si470x_fops_release (struct file *file)
 
int si470x_vidioc_querycap (struct file *file, void *priv, struct v4l2_capability *capability)
 
 module_i2c_driver (si470x_i2c_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_VERSION (DRIVER_VERSION)
 

Macro Definition Documentation

#define DRIVER_AUTHOR   "Joonyoung Shim <[email protected]>";

Definition at line 26 of file radio-si470x-i2c.c.

#define DRIVER_CARD   "Silicon Labs Si470x FM Radio Receiver"

Definition at line 27 of file radio-si470x-i2c.c.

#define DRIVER_DESC   "I2C radio driver for Si470x FM Radio Receivers"

Definition at line 28 of file radio-si470x-i2c.c.

#define DRIVER_VERSION   "1.0.2"

Definition at line 29 of file radio-si470x-i2c.c.

#define READ_INDEX (   i)    ((i + RADIO_REGISTER_NUM - 0x0a) % READ_REG_NUM)

Definition at line 86 of file radio-si470x-i2c.c.

#define READ_REG_NUM   RADIO_REGISTER_NUM

Definition at line 85 of file radio-si470x-i2c.c.

#define WRITE_INDEX (   i)    (i + 0x02)

Definition at line 82 of file radio-si470x-i2c.c.

#define WRITE_REG_NUM   8

Definition at line 81 of file radio-si470x-i2c.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( i2c  ,
si470x_i2c_id   
)
module_i2c_driver ( si470x_i2c_driver  )
MODULE_LICENSE ( "GPL"  )
module_param ( radio_nr  ,
int  ,
0444   
)
module_param ( rds_buf  ,
uint  ,
0444   
)
module_param ( max_rds_errors  ,
ushort  ,
0644   
)
MODULE_PARM_DESC ( radio_nr  ,
"Radio Nr"   
)
MODULE_PARM_DESC ( rds_buf  ,
"RDS buffer entries: *100*"   
)
MODULE_PARM_DESC ( max_rds_errors  ,
"RDS maximum block errors: *1*"   
)
MODULE_VERSION ( DRIVER_VERSION  )
int si470x_fops_open ( struct file file)

Definition at line 182 of file radio-si470x-i2c.c.

int si470x_fops_release ( struct file file)

Definition at line 214 of file radio-si470x-i2c.c.

int si470x_get_register ( struct si470x_device radio,
int  regnr 
)

Definition at line 97 of file radio-si470x-i2c.c.

int si470x_set_register ( struct si470x_device radio,
int  regnr 
)

Definition at line 121 of file radio-si470x-i2c.c.

int si470x_vidioc_querycap ( struct file file,
void priv,
struct v4l2_capability capability 
)

Definition at line 234 of file radio-si470x-i2c.c.