summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/si470x/radio-si470x.h
diff options
context:
space:
mode:
authorTobias Lorenz <tobias.lorenz@gmx.net>2009-08-10 18:44:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 12:18:43 -0300
commit9dcb79c2eedb5b3ec50f73bd531fb6dd52c94bfc (patch)
treed6aea422e271c26b06562fdddc84fc2d5210501e /drivers/media/radio/si470x/radio-si470x.h
parentcc35bbddfe10f77d949f0190764b252cd2b70c3c (diff)
V4L/DVB (12417): I2C cleanups and version checks
The structure and comments of the I2C part have been adopted to fit to the USB part. Some additional cleanups and precisements have been made to the version detection and checking functionality to clearly separate HW/SW/FW version. Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/si470x/radio-si470x.h')
-rw-r--r--drivers/media/radio/si470x/radio-si470x.h45
1 files changed, 31 insertions, 14 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
index 794112c759b..d0af194d194 100644
--- a/drivers/media/radio/si470x/radio-si470x.h
+++ b/drivers/media/radio/si470x/radio-si470x.h
@@ -41,6 +41,7 @@
#include <asm/unaligned.h>
+
/**************************************************************************
* Register Definitions
**************************************************************************/
@@ -133,6 +134,7 @@
#define RDSD_RDSD 0xffff /* bits 15..00: RDS Block D Data (Si4701 only) */
+
/**************************************************************************
* General Driver Definitions
**************************************************************************/
@@ -143,9 +145,19 @@
struct si470x_device {
struct video_device *videodev;
-#if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE)
- struct i2c_client *client;
-#endif
+ /* driver management */
+ unsigned int users;
+
+ /* Silabs internal registers (0..15) */
+ unsigned short registers[RADIO_REGISTER_NUM];
+
+ /* RDS receive buffer */
+ wait_queue_head_t read_queue;
+ struct mutex lock; /* buffer locking */
+ unsigned char *buffer; /* size is always multiple of three */
+ unsigned int buf_size;
+ unsigned int rd_index;
+ unsigned int wr_index;
#if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE)
/* reference to USB and video device */
@@ -166,21 +178,26 @@ struct si470x_device {
unsigned char disconnected;
struct mutex disconnect_lock;
#endif
- unsigned int users;
-
- /* Silabs internal registers (0..15) */
- unsigned short registers[RADIO_REGISTER_NUM];
- /* RDS receive buffer */
- wait_queue_head_t read_queue;
- struct mutex lock; /* buffer locking */
- unsigned char *buffer; /* size is always multiple of three */
- unsigned int buf_size;
- unsigned int rd_index;
- unsigned int wr_index;
+#if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE)
+ struct i2c_client *client;
+#endif
};
+
+/**************************************************************************
+ * Firmware Versions
+ **************************************************************************/
+
+#define RADIO_FW_VERSION 15
+
+
+
+/**************************************************************************
+ * Frequency Multiplicator
+ **************************************************************************/
+
/*
* The frequency is set in units of 62.5 Hz when using V4L2_TUNER_CAP_LOW,
* 62.5 kHz otherwise.