blob: c3e96f070973f993242af93d0822cdceae8bb143 [file] [log] [blame]
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -07001/*
2 Driver for SAA6588 RDS decoder
3
4 (c) 2005 Hans J. Koch
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21
22#include <linux/module.h>
23#include <linux/kernel.h>
24#include <linux/i2c.h>
25#include <linux/types.h>
Hans Verkuil7f6adea2009-02-19 17:31:17 -030026#include <linux/videodev2.h>
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070027#include <linux/init.h>
28#include <linux/errno.h>
29#include <linux/slab.h>
30#include <linux/poll.h>
31#include <linux/wait.h>
32#include <asm/uaccess.h>
33
Mauro Carvalho Chehabfa3fcce2006-03-23 21:45:24 -030034#include <media/rds.h>
Hans Verkuilc3fda7f2009-02-11 19:23:57 -030035#include <media/v4l2-device.h>
Hans Verkuilf1f8c902009-02-11 19:28:30 -030036#include <media/v4l2-chip-ident.h>
Hans Verkuilaef82202009-03-29 06:29:30 -030037#include <media/v4l2-i2c-drv.h>
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070038
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070039
40/* insmod options */
Douglas Schilling Landgrafff699e62008-04-22 14:41:48 -030041static unsigned int debug;
42static unsigned int xtal;
Hans Verkuil3c86cf72009-06-20 06:09:14 -030043static unsigned int mmbs;
Douglas Schilling Landgrafff699e62008-04-22 14:41:48 -030044static unsigned int plvl;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070045static unsigned int bufblocks = 100;
46
Eric Sesterhenn / snakebyte9b565eb2006-01-13 14:10:23 -020047module_param(debug, int, 0644);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070048MODULE_PARM_DESC(debug, "enable debug messages");
Eric Sesterhenn / snakebyte9b565eb2006-01-13 14:10:23 -020049module_param(xtal, int, 0);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070050MODULE_PARM_DESC(xtal, "select oscillator frequency (0..3), default 0");
Hans Verkuil3c86cf72009-06-20 06:09:14 -030051module_param(mmbs, int, 0);
52MODULE_PARM_DESC(mmbs, "enable MMBS mode: 0=off (default), 1=on");
Eric Sesterhenn / snakebyte9b565eb2006-01-13 14:10:23 -020053module_param(plvl, int, 0);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070054MODULE_PARM_DESC(plvl, "select pause level (0..3), default 0");
Eric Sesterhenn / snakebyte9b565eb2006-01-13 14:10:23 -020055module_param(bufblocks, int, 0);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070056MODULE_PARM_DESC(bufblocks, "number of buffered blocks, default 100");
57
58MODULE_DESCRIPTION("v4l2 driver module for SAA6588 RDS decoder");
59MODULE_AUTHOR("Hans J. Koch <koch@hjk-az.de>");
60
61MODULE_LICENSE("GPL");
62
63/* ---------------------------------------------------------------------- */
64
65#define UNSET (-1U)
66#define PREFIX "saa6588: "
67#define dprintk if (debug) printk
68
69struct saa6588 {
Hans Verkuilc3fda7f2009-02-11 19:23:57 -030070 struct v4l2_subdev sd;
Jean Delvarefb6991d2009-03-07 07:44:12 -030071 struct delayed_work work;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070072 spinlock_t lock;
73 unsigned char *buffer;
74 unsigned int buf_size;
75 unsigned int rd_index;
76 unsigned int wr_index;
77 unsigned int block_count;
78 unsigned char last_blocknum;
79 wait_queue_head_t read_queue;
80 int data_available_for_read;
Hans Verkuil3c86cf72009-06-20 06:09:14 -030081 u8 sync;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070082};
83
Hans Verkuilc3fda7f2009-02-11 19:23:57 -030084static inline struct saa6588 *to_saa6588(struct v4l2_subdev *sd)
85{
86 return container_of(sd, struct saa6588, sd);
87}
88
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -070089/* ---------------------------------------------------------------------- */
90
91/*
92 * SAA6588 defines
93 */
94
95/* Initialization and mode control byte (0w) */
96
97/* bit 0+1 (DAC0/DAC1) */
98#define cModeStandard 0x00
99#define cModeFastPI 0x01
100#define cModeReducedRequest 0x02
101#define cModeInvalid 0x03
102
103/* bit 2 (RBDS) */
104#define cProcessingModeRDS 0x00
105#define cProcessingModeRBDS 0x04
106
107/* bit 3+4 (SYM0/SYM1) */
108#define cErrCorrectionNone 0x00
109#define cErrCorrection2Bits 0x08
110#define cErrCorrection5Bits 0x10
111#define cErrCorrectionNoneRBDS 0x18
112
113/* bit 5 (NWSY) */
114#define cSyncNormal 0x00
115#define cSyncRestart 0x20
116
117/* bit 6 (TSQD) */
118#define cSigQualityDetectOFF 0x00
119#define cSigQualityDetectON 0x40
120
121/* bit 7 (SQCM) */
122#define cSigQualityTriggered 0x00
123#define cSigQualityContinous 0x80
124
125/* Pause level and flywheel control byte (1w) */
126
127/* bits 0..5 (FEB0..FEB5) */
128#define cFlywheelMaxBlocksMask 0x3F
129#define cFlywheelDefault 0x20
130
131/* bits 6+7 (PL0/PL1) */
132#define cPauseLevel_11mV 0x00
133#define cPauseLevel_17mV 0x40
134#define cPauseLevel_27mV 0x80
135#define cPauseLevel_43mV 0xC0
136
137/* Pause time/oscillator frequency/quality detector control byte (1w) */
138
139/* bits 0..4 (SQS0..SQS4) */
140#define cQualityDetectSensMask 0x1F
141#define cQualityDetectDefault 0x0F
142
143/* bit 5 (SOSC) */
144#define cSelectOscFreqOFF 0x00
145#define cSelectOscFreqON 0x20
146
147/* bit 6+7 (PTF0/PTF1) */
148#define cOscFreq_4332kHz 0x00
149#define cOscFreq_8664kHz 0x40
150#define cOscFreq_12996kHz 0x80
151#define cOscFreq_17328kHz 0xC0
152
153/* ---------------------------------------------------------------------- */
154
Al Viroae8aed02005-09-29 00:37:34 +0100155static int block_to_user_buf(struct saa6588 *s, unsigned char __user *user_buf)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700156{
157 int i;
158
159 if (s->rd_index == s->wr_index) {
160 if (debug > 2)
161 dprintk(PREFIX "Read: buffer empty.\n");
162 return 0;
163 }
164
165 if (debug > 2) {
166 dprintk(PREFIX "Read: ");
167 for (i = s->rd_index; i < s->rd_index + 3; i++)
168 dprintk("0x%02x ", s->buffer[i]);
169 }
170
171 if (copy_to_user(user_buf, &s->buffer[s->rd_index], 3))
172 return -EFAULT;
173
174 s->rd_index += 3;
175 if (s->rd_index >= s->buf_size)
176 s->rd_index = 0;
177 s->block_count--;
178
179 if (debug > 2)
180 dprintk("%d blocks total.\n", s->block_count);
181
182 return 1;
183}
184
185static void read_from_buf(struct saa6588 *s, struct rds_command *a)
186{
187 unsigned long flags;
188
Al Viroae8aed02005-09-29 00:37:34 +0100189 unsigned char __user *buf_ptr = a->buffer;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700190 unsigned int i;
191 unsigned int rd_blocks;
192
193 a->result = 0;
194 if (!a->buffer)
195 return;
196
197 while (!s->data_available_for_read) {
198 int ret = wait_event_interruptible(s->read_queue,
199 s->data_available_for_read);
200 if (ret == -ERESTARTSYS) {
201 a->result = -EINTR;
202 return;
203 }
204 }
205
206 spin_lock_irqsave(&s->lock, flags);
207 rd_blocks = a->block_count;
208 if (rd_blocks > s->block_count)
209 rd_blocks = s->block_count;
210
Ira Snydera5bbc7d2006-11-20 07:20:48 -0300211 if (!rd_blocks) {
212 spin_unlock_irqrestore(&s->lock, flags);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700213 return;
Ira Snydera5bbc7d2006-11-20 07:20:48 -0300214 }
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700215
216 for (i = 0; i < rd_blocks; i++) {
217 if (block_to_user_buf(s, buf_ptr)) {
218 buf_ptr += 3;
219 a->result++;
220 } else
221 break;
222 }
223 a->result *= 3;
224 s->data_available_for_read = (s->block_count > 0);
225 spin_unlock_irqrestore(&s->lock, flags);
226}
227
228static void block_to_buf(struct saa6588 *s, unsigned char *blockbuf)
229{
230 unsigned int i;
231
232 if (debug > 3)
233 dprintk(PREFIX "New block: ");
234
235 for (i = 0; i < 3; ++i) {
236 if (debug > 3)
237 dprintk("0x%02x ", blockbuf[i]);
238 s->buffer[s->wr_index] = blockbuf[i];
239 s->wr_index++;
240 }
241
242 if (s->wr_index >= s->buf_size)
243 s->wr_index = 0;
244
245 if (s->wr_index == s->rd_index) {
Hans J. Koch6c3d67a2005-11-08 21:38:39 -0800246 s->rd_index += 3;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700247 if (s->rd_index >= s->buf_size)
248 s->rd_index = 0;
249 } else
250 s->block_count++;
251
252 if (debug > 3)
253 dprintk("%d blocks total.\n", s->block_count);
254}
255
256static void saa6588_i2c_poll(struct saa6588 *s)
257{
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300258 struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700259 unsigned long flags;
260 unsigned char tmpbuf[6];
261 unsigned char blocknum;
262 unsigned char tmp;
263
264 /* Although we only need 3 bytes, we have to read at least 6.
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300265 SAA6588 returns garbage otherwise. */
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300266 if (6 != i2c_master_recv(client, &tmpbuf[0], 6)) {
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700267 if (debug > 1)
268 dprintk(PREFIX "read error!\n");
269 return;
270 }
271
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300272 s->sync = tmpbuf[0] & 0x10;
273 if (!s->sync)
274 return;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700275 blocknum = tmpbuf[0] >> 5;
276 if (blocknum == s->last_blocknum) {
277 if (debug > 3)
278 dprintk("Saw block %d again.\n", blocknum);
279 return;
280 }
281
282 s->last_blocknum = blocknum;
283
284 /*
285 Byte order according to v4l2 specification:
286
287 Byte 0: Least Significant Byte of RDS Block
288 Byte 1: Most Significant Byte of RDS Block
289 Byte 2 Bit 7: Error bit. Indicates that an uncorrectable error
290 occurred during reception of this block.
291 Bit 6: Corrected bit. Indicates that an error was
292 corrected for this data block.
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300293 Bits 5-3: Same as bits 0-2.
294 Bits 2-0: Block number.
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700295
296 SAA6588 byte order is Status-MSB-LSB, so we have to swap the
297 first and the last of the 3 bytes block.
298 */
299
300 tmp = tmpbuf[2];
301 tmpbuf[2] = tmpbuf[0];
302 tmpbuf[0] = tmp;
303
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300304 /* Map 'Invalid block E' to 'Invalid Block' */
305 if (blocknum == 6)
306 blocknum = V4L2_RDS_BLOCK_INVALID;
307 /* And if are not in mmbs mode, then 'Block E' is also mapped
308 to 'Invalid Block'. As far as I can tell MMBS is discontinued,
309 and if there is ever a need to support E blocks, then please
310 contact the linux-media mailinglist. */
311 else if (!mmbs && blocknum == 5)
312 blocknum = V4L2_RDS_BLOCK_INVALID;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700313 tmp = blocknum;
314 tmp |= blocknum << 3; /* Received offset == Offset Name (OK ?) */
315 if ((tmpbuf[2] & 0x03) == 0x03)
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300316 tmp |= V4L2_RDS_BLOCK_ERROR; /* uncorrectable error */
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700317 else if ((tmpbuf[2] & 0x03) != 0x00)
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300318 tmp |= V4L2_RDS_BLOCK_CORRECTED; /* corrected error */
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700319 tmpbuf[2] = tmp; /* Is this enough ? Should we also check other bits ? */
320
321 spin_lock_irqsave(&s->lock, flags);
322 block_to_buf(s, tmpbuf);
323 spin_unlock_irqrestore(&s->lock, flags);
324 s->data_available_for_read = 1;
325 wake_up_interruptible(&s->read_queue);
326}
327
David Howellsc4028952006-11-22 14:57:56 +0000328static void saa6588_work(struct work_struct *work)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700329{
Jean Delvarefb6991d2009-03-07 07:44:12 -0300330 struct saa6588 *s = container_of(work, struct saa6588, work.work);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700331
332 saa6588_i2c_poll(s);
Jean Delvarefb6991d2009-03-07 07:44:12 -0300333 schedule_delayed_work(&s->work, msecs_to_jiffies(20));
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700334}
335
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300336static void saa6588_configure(struct saa6588 *s)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700337{
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300338 struct i2c_client *client = v4l2_get_subdevdata(&s->sd);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700339 unsigned char buf[3];
340 int rc;
341
342 buf[0] = cSyncRestart;
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300343 if (mmbs)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700344 buf[0] |= cProcessingModeRBDS;
345
346 buf[1] = cFlywheelDefault;
347 switch (plvl) {
348 case 0:
349 buf[1] |= cPauseLevel_11mV;
350 break;
351 case 1:
352 buf[1] |= cPauseLevel_17mV;
353 break;
354 case 2:
355 buf[1] |= cPauseLevel_27mV;
356 break;
357 case 3:
358 buf[1] |= cPauseLevel_43mV;
359 break;
360 default: /* nothing */
361 break;
362 }
363
364 buf[2] = cQualityDetectDefault | cSelectOscFreqON;
365
366 switch (xtal) {
367 case 0:
368 buf[2] |= cOscFreq_4332kHz;
369 break;
370 case 1:
371 buf[2] |= cOscFreq_8664kHz;
372 break;
373 case 2:
374 buf[2] |= cOscFreq_12996kHz;
375 break;
376 case 3:
377 buf[2] |= cOscFreq_17328kHz;
378 break;
379 default: /* nothing */
380 break;
381 }
382
383 dprintk(PREFIX "writing: 0w=0x%02x 1w=0x%02x 2w=0x%02x\n",
384 buf[0], buf[1], buf[2]);
385
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300386 rc = i2c_master_send(client, buf, 3);
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300387 if (rc != 3)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700388 printk(PREFIX "i2c i/o error: rc == %d (should be 3)\n", rc);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700389}
390
391/* ---------------------------------------------------------------------- */
392
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300393static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700394{
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300395 struct saa6588 *s = to_saa6588(sd);
396 struct rds_command *a = arg;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700397
398 switch (cmd) {
399 /* --- open() for /dev/radio --- */
400 case RDS_CMD_OPEN:
401 a->result = 0; /* return error if chip doesn't work ??? */
402 break;
403 /* --- close() for /dev/radio --- */
404 case RDS_CMD_CLOSE:
405 s->data_available_for_read = 1;
406 wake_up_interruptible(&s->read_queue);
407 a->result = 0;
408 break;
409 /* --- read() for /dev/radio --- */
410 case RDS_CMD_READ:
411 read_from_buf(s, a);
412 break;
413 /* --- poll() for /dev/radio --- */
414 case RDS_CMD_POLL:
415 a->result = 0;
416 if (s->data_available_for_read) {
417 a->result |= POLLIN | POLLRDNORM;
418 }
419 poll_wait(a->instance, &s->read_queue, a->event_list);
420 break;
421
422 default:
423 /* nothing */
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300424 return -ENOIOCTLCMD;
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700425 }
426 return 0;
427}
428
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300429static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
430{
431 struct saa6588 *s = to_saa6588(sd);
432
433 vt->capability |= V4L2_TUNER_CAP_RDS;
434 if (s->sync)
435 vt->rxsubchans |= V4L2_TUNER_SUB_RDS;
436 return 0;
437}
438
439static int saa6588_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
440{
441 struct saa6588 *s = to_saa6588(sd);
442
443 saa6588_configure(s);
444 return 0;
445}
446
Hans Verkuilf1f8c902009-02-11 19:28:30 -0300447static int saa6588_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
448{
449 struct i2c_client *client = v4l2_get_subdevdata(sd);
450
451 return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA6588, 0);
452}
453
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300454/* ----------------------------------------------------------------------- */
455
456static const struct v4l2_subdev_core_ops saa6588_core_ops = {
Hans Verkuilf1f8c902009-02-11 19:28:30 -0300457 .g_chip_ident = saa6588_g_chip_ident,
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300458 .ioctl = saa6588_ioctl,
459};
460
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300461static const struct v4l2_subdev_tuner_ops saa6588_tuner_ops = {
462 .g_tuner = saa6588_g_tuner,
463 .s_tuner = saa6588_s_tuner,
464};
465
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300466static const struct v4l2_subdev_ops saa6588_ops = {
467 .core = &saa6588_core_ops,
Hans Verkuil3c86cf72009-06-20 06:09:14 -0300468 .tuner = &saa6588_tuner_ops,
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300469};
470
471/* ---------------------------------------------------------------------- */
472
473static int saa6588_probe(struct i2c_client *client,
474 const struct i2c_device_id *id)
475{
476 struct saa6588 *s;
477 struct v4l2_subdev *sd;
478
479 v4l_info(client, "saa6588 found @ 0x%x (%s)\n",
480 client->addr << 1, client->adapter->name);
481
482 s = kzalloc(sizeof(*s), GFP_KERNEL);
483 if (s == NULL)
484 return -ENOMEM;
485
486 s->buf_size = bufblocks * 3;
487
488 s->buffer = kmalloc(s->buf_size, GFP_KERNEL);
489 if (s->buffer == NULL) {
490 kfree(s);
491 return -ENOMEM;
492 }
493 sd = &s->sd;
494 v4l2_i2c_subdev_init(sd, client, &saa6588_ops);
495 spin_lock_init(&s->lock);
496 s->block_count = 0;
497 s->wr_index = 0;
498 s->rd_index = 0;
499 s->last_blocknum = 0xff;
500 init_waitqueue_head(&s->read_queue);
501 s->data_available_for_read = 0;
502
503 saa6588_configure(s);
504
505 /* start polling via eventd */
Jean Delvarefb6991d2009-03-07 07:44:12 -0300506 INIT_DELAYED_WORK(&s->work, saa6588_work);
507 schedule_delayed_work(&s->work, 0);
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300508 return 0;
509}
510
511static int saa6588_remove(struct i2c_client *client)
512{
513 struct v4l2_subdev *sd = i2c_get_clientdata(client);
514 struct saa6588 *s = to_saa6588(sd);
515
516 v4l2_device_unregister_subdev(sd);
517
Jean Delvarefb6991d2009-03-07 07:44:12 -0300518 cancel_delayed_work_sync(&s->work);
Hans Verkuilc3fda7f2009-02-11 19:23:57 -0300519
520 kfree(s->buffer);
521 kfree(s);
522 return 0;
523}
524
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700525/* ----------------------------------------------------------------------- */
526
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300527static const struct i2c_device_id saa6588_id[] = {
528 { "saa6588", 0 },
529 { }
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700530};
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300531MODULE_DEVICE_TABLE(i2c, saa6588_id);
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700532
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300533static struct v4l2_i2c_driver_data v4l2_i2c_data = {
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700534 .name = "saa6588",
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300535 .probe = saa6588_probe,
536 .remove = saa6588_remove,
Hans Verkuilb5ffc222009-02-11 19:14:09 -0300537 .id_table = saa6588_id,
Mauro Carvalho Chehab10b89ee32005-09-09 13:04:03 -0700538};