diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-08-04 20:38:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:49 -0400 |
commit | 90a71b1c1ab003dd4524afca44c2ad2519f4420c (patch) | |
tree | bc5852eaaaac7f9c81778ab95ee90333d552b69a /drivers/media/video/cx23885/cx23885-dvb.c | |
parent | 0fbbff33fcab605b1a5c53a20c302aad24b082ef (diff) |
V4L/DVB (8643): Switch Hauppauge HVR1400 and HVR1500 to common cx23885 tuner callback
The Hauppauge HVR1400 and HVR1500 can now use the common cx23885 tuner
callback.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-dvb.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index bfe49df3f6dd..45670051e7d5 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -303,36 +303,6 @@ static struct dib7000p_config hauppauge_hvr1400_dib7000_config = { | |||
303 | .output_mode = OUTMODE_MPEG2_SERIAL, | 303 | .output_mode = OUTMODE_MPEG2_SERIAL, |
304 | }; | 304 | }; |
305 | 305 | ||
306 | static int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg) | ||
307 | { | ||
308 | struct cx23885_tsport *port = ptr; | ||
309 | struct cx23885_dev *dev = port->dev; | ||
310 | |||
311 | switch (command) { | ||
312 | case XC2028_TUNER_RESET: | ||
313 | /* Send the tuner in then out of reset */ | ||
314 | /* GPIO-2 xc3028 tuner */ | ||
315 | dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __func__, arg); | ||
316 | |||
317 | cx_set(GP0_IO, 0x00040000); | ||
318 | cx_clear(GP0_IO, 0x00000004); | ||
319 | msleep(5); | ||
320 | |||
321 | cx_set(GP0_IO, 0x00040004); | ||
322 | msleep(5); | ||
323 | break; | ||
324 | case XC2028_RESET_CLK: | ||
325 | dprintk(1, "%s: XC2028_RESET_CLK %d\n", __func__, arg); | ||
326 | break; | ||
327 | default: | ||
328 | dprintk(1, "%s: unknown command %d, arg %d\n", __func__, | ||
329 | command, arg); | ||
330 | return -EINVAL; | ||
331 | } | ||
332 | |||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | static int dvb_register(struct cx23885_tsport *port) | 306 | static int dvb_register(struct cx23885_tsport *port) |
337 | { | 307 | { |
338 | struct cx23885_dev *dev = port->dev; | 308 | struct cx23885_dev *dev = port->dev; |
@@ -426,7 +396,7 @@ static int dvb_register(struct cx23885_tsport *port) | |||
426 | struct xc2028_config cfg = { | 396 | struct xc2028_config cfg = { |
427 | .i2c_adap = &i2c_bus->i2c_adap, | 397 | .i2c_adap = &i2c_bus->i2c_adap, |
428 | .i2c_addr = 0x61, | 398 | .i2c_addr = 0x61, |
429 | .callback = cx23885_hvr1500_xc3028_callback, | 399 | .callback = cx23885_xc3028_tuner_callback, |
430 | }; | 400 | }; |
431 | static struct xc2028_ctrl ctl = { | 401 | static struct xc2028_ctrl ctl = { |
432 | .fname = "xc3028-v27.fw", | 402 | .fname = "xc3028-v27.fw", |
@@ -465,7 +435,7 @@ static int dvb_register(struct cx23885_tsport *port) | |||
465 | struct xc2028_config cfg = { | 435 | struct xc2028_config cfg = { |
466 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, | 436 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, |
467 | .i2c_addr = 0x64, | 437 | .i2c_addr = 0x64, |
468 | .callback = cx23885_hvr1500_xc3028_callback, | 438 | .callback = cx23885_xc3028_tuner_callback, |
469 | }; | 439 | }; |
470 | static struct xc2028_ctrl ctl = { | 440 | static struct xc2028_ctrl ctl = { |
471 | .fname = "xc3028L-v36.fw", | 441 | .fname = "xc3028L-v36.fw", |