diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-09-12 12:31:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:09 -0400 |
commit | d7cba043d7ec840d67bd5143779d1febe7d83407 (patch) | |
tree | 4fb46684538e0ad7d3229f592182ed6121049d69 /drivers/media/video/cx88/cx88-dvb.c | |
parent | ebb8d68a5c8c236acd8e8cf8f0d6046e027a8e21 (diff) |
V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index cd368b512d1..6751f36e061 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -405,40 +405,6 @@ static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, | |||
405 | return 0; | 405 | return 0; |
406 | } | 406 | } |
407 | 407 | ||
408 | static int cx88_pci_nano_callback(void *ptr, int command, int arg) | ||
409 | { | ||
410 | struct cx88_core *core = ptr; | ||
411 | |||
412 | switch (command) { | ||
413 | case XC2028_TUNER_RESET: | ||
414 | /* Send the tuner in then out of reset */ | ||
415 | dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __func__, arg); | ||
416 | |||
417 | switch (core->boardnr) { | ||
418 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
419 | /* GPIO-4 xc3028 tuner */ | ||
420 | |||
421 | cx_set(MO_GP0_IO, 0x00001000); | ||
422 | cx_clear(MO_GP0_IO, 0x00000010); | ||
423 | msleep(100); | ||
424 | cx_set(MO_GP0_IO, 0x00000010); | ||
425 | msleep(100); | ||
426 | break; | ||
427 | } | ||
428 | |||
429 | break; | ||
430 | case XC2028_RESET_CLK: | ||
431 | dprintk(1, "%s: XC2028_RESET_CLK %d\n", __func__, arg); | ||
432 | break; | ||
433 | default: | ||
434 | dprintk(1, "%s: unknown command %d, arg %d\n", __func__, | ||
435 | command, arg); | ||
436 | return -EINVAL; | ||
437 | } | ||
438 | |||
439 | return 0; | ||
440 | } | ||
441 | |||
442 | static struct cx24123_config geniatech_dvbs_config = { | 408 | static struct cx24123_config geniatech_dvbs_config = { |
443 | .demod_address = 0x55, | 409 | .demod_address = 0x55, |
444 | .set_ts_params = cx24123_set_ts_param, | 410 | .set_ts_params = cx24123_set_ts_param, |
@@ -486,7 +452,6 @@ static struct s5h1409_config kworld_atsc_120_config = { | |||
486 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { | 452 | static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { |
487 | .i2c_address = 0x64, | 453 | .i2c_address = 0x64, |
488 | .if_khz = 5380, | 454 | .if_khz = 5380, |
489 | .tuner_callback = cx88_tuner_callback, | ||
490 | }; | 455 | }; |
491 | 456 | ||
492 | static struct zl10353_config cx88_geniatech_x8000_mt = { | 457 | static struct zl10353_config cx88_geniatech_x8000_mt = { |
@@ -507,7 +472,6 @@ static struct s5h1411_config dvico_fusionhdtv7_config = { | |||
507 | static struct xc5000_config dvico_fusionhdtv7_tuner_config = { | 472 | static struct xc5000_config dvico_fusionhdtv7_tuner_config = { |
508 | .i2c_address = 0xc2 >> 1, | 473 | .i2c_address = 0xc2 >> 1, |
509 | .if_khz = 5380, | 474 | .if_khz = 5380, |
510 | .tuner_callback = cx88_tuner_callback, | ||
511 | }; | 475 | }; |
512 | 476 | ||
513 | static int attach_xc3028(u8 addr, struct cx8802_dev *dev) | 477 | static int attach_xc3028(u8 addr, struct cx8802_dev *dev) |
@@ -518,7 +482,6 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev) | |||
518 | .i2c_adap = &dev->core->i2c_adap, | 482 | .i2c_adap = &dev->core->i2c_adap, |
519 | .i2c_addr = addr, | 483 | .i2c_addr = addr, |
520 | .ctrl = &ctl, | 484 | .ctrl = &ctl, |
521 | .callback = cx88_tuner_callback, | ||
522 | }; | 485 | }; |
523 | 486 | ||
524 | if (!dev->dvb.frontend) { | 487 | if (!dev->dvb.frontend) { |
@@ -912,7 +875,6 @@ static int dvb_register(struct cx8802_dev *dev) | |||
912 | struct xc2028_config cfg = { | 875 | struct xc2028_config cfg = { |
913 | .i2c_adap = &core->i2c_adap, | 876 | .i2c_adap = &core->i2c_adap, |
914 | .i2c_addr = 0x61, | 877 | .i2c_addr = 0x61, |
915 | .callback = cx88_pci_nano_callback, | ||
916 | }; | 878 | }; |
917 | static struct xc2028_ctrl ctl = { | 879 | static struct xc2028_ctrl ctl = { |
918 | .fname = XC2028_DEFAULT_FIRMWARE, | 880 | .fname = XC2028_DEFAULT_FIRMWARE, |
@@ -1035,6 +997,8 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1035 | core->name); | 997 | core->name); |
1036 | return -EINVAL; | 998 | return -EINVAL; |
1037 | } | 999 | } |
1000 | /* define general-purpose callback pointer */ | ||
1001 | dev->dvb.frontend->callback = cx88_tuner_callback; | ||
1038 | 1002 | ||
1039 | /* Ensure all frontends negotiate bus access */ | 1003 | /* Ensure all frontends negotiate bus access */ |
1040 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; | 1004 | dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; |