diff options
Diffstat (limited to 'drivers/media/radio/si470x/radio-si470x.h')
-rw-r--r-- | drivers/media/radio/si470x/radio-si470x.h | 45 |
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 794112c759b8..d0af194d194c 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/unaligned.h> | 41 | #include <asm/unaligned.h> |
42 | 42 | ||
43 | 43 | ||
44 | |||
44 | /************************************************************************** | 45 | /************************************************************************** |
45 | * Register Definitions | 46 | * Register Definitions |
46 | **************************************************************************/ | 47 | **************************************************************************/ |
@@ -133,6 +134,7 @@ | |||
133 | #define RDSD_RDSD 0xffff /* bits 15..00: RDS Block D Data (Si4701 only) */ | 134 | #define RDSD_RDSD 0xffff /* bits 15..00: RDS Block D Data (Si4701 only) */ |
134 | 135 | ||
135 | 136 | ||
137 | |||
136 | /************************************************************************** | 138 | /************************************************************************** |
137 | * General Driver Definitions | 139 | * General Driver Definitions |
138 | **************************************************************************/ | 140 | **************************************************************************/ |
@@ -143,9 +145,19 @@ | |||
143 | struct si470x_device { | 145 | struct si470x_device { |
144 | struct video_device *videodev; | 146 | struct video_device *videodev; |
145 | 147 | ||
146 | #if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE) | 148 | /* driver management */ |
147 | struct i2c_client *client; | 149 | unsigned int users; |
148 | #endif | 150 | |
151 | /* Silabs internal registers (0..15) */ | ||
152 | unsigned short registers[RADIO_REGISTER_NUM]; | ||
153 | |||
154 | /* RDS receive buffer */ | ||
155 | wait_queue_head_t read_queue; | ||
156 | struct mutex lock; /* buffer locking */ | ||
157 | unsigned char *buffer; /* size is always multiple of three */ | ||
158 | unsigned int buf_size; | ||
159 | unsigned int rd_index; | ||
160 | unsigned int wr_index; | ||
149 | 161 | ||
150 | #if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE) | 162 | #if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE) |
151 | /* reference to USB and video device */ | 163 | /* reference to USB and video device */ |
@@ -166,21 +178,26 @@ struct si470x_device { | |||
166 | unsigned char disconnected; | 178 | unsigned char disconnected; |
167 | struct mutex disconnect_lock; | 179 | struct mutex disconnect_lock; |
168 | #endif | 180 | #endif |
169 | unsigned int users; | ||
170 | |||
171 | /* Silabs internal registers (0..15) */ | ||
172 | unsigned short registers[RADIO_REGISTER_NUM]; | ||
173 | 181 | ||
174 | /* RDS receive buffer */ | 182 | #if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE) |
175 | wait_queue_head_t read_queue; | 183 | struct i2c_client *client; |
176 | struct mutex lock; /* buffer locking */ | 184 | #endif |
177 | unsigned char *buffer; /* size is always multiple of three */ | ||
178 | unsigned int buf_size; | ||
179 | unsigned int rd_index; | ||
180 | unsigned int wr_index; | ||
181 | }; | 185 | }; |
182 | 186 | ||
183 | 187 | ||
188 | |||
189 | /************************************************************************** | ||
190 | * Firmware Versions | ||
191 | **************************************************************************/ | ||
192 | |||
193 | #define RADIO_FW_VERSION 15 | ||
194 | |||
195 | |||
196 | |||
197 | /************************************************************************** | ||
198 | * Frequency Multiplicator | ||
199 | **************************************************************************/ | ||
200 | |||
184 | /* | 201 | /* |
185 | * The frequency is set in units of 62.5 Hz when using V4L2_TUNER_CAP_LOW, | 202 | * The frequency is set in units of 62.5 Hz when using V4L2_TUNER_CAP_LOW, |
186 | * 62.5 kHz otherwise. | 203 | * 62.5 kHz otherwise. |