diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-09-26 19:01:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:17:40 -0400 |
commit | 1a4aa920d0b49af2c0d9bbedb3bb75be4e174218 (patch) | |
tree | b645fbabdc9c9b02a14b0ebbab7b71627ad44866 /drivers/media | |
parent | 24c80b651b6e938ab8c41ffb2ca9896bca764e10 (diff) |
[media] cx231xx: properly use the right tuner i2c address
The driver has a field to indicate what bus is used by tuner and
by demod. However, this field were never used. On Pixelview,
it uses I2C 2 for tuner, instead of I2C 1.
drivers/media/video/cx231xx/cx231xx-cards.c
Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-dvb.c | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index b516068b6edb..8e088db1a568 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -569,7 +569,7 @@ void cx231xx_card_setup(struct cx231xx *dev) | |||
569 | /* Initialize the tuner */ | 569 | /* Initialize the tuner */ |
570 | if (dev->board.tuner_type != TUNER_ABSENT) { | 570 | if (dev->board.tuner_type != TUNER_ABSENT) { |
571 | dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, | 571 | dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
572 | &dev->i2c_bus[1].i2c_adap, | 572 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
573 | "tuner", "tuner", | 573 | "tuner", "tuner", |
574 | dev->tuner_addr, NULL); | 574 | dev->tuner_addr, NULL); |
575 | if (dev->sd_tuner == NULL) | 575 | if (dev->sd_tuner == NULL) |
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index 879eacb2c9c4..4efd3d3a6a73 100644 --- a/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/drivers/media/video/cx231xx/cx231xx-dvb.c | |||
@@ -347,7 +347,7 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev) | |||
347 | struct xc5000_config cfg; | 347 | struct xc5000_config cfg; |
348 | 348 | ||
349 | memset(&cfg, 0, sizeof(cfg)); | 349 | memset(&cfg, 0, sizeof(cfg)); |
350 | cfg.i2c_adap = &dev->i2c_bus[1].i2c_adap; | 350 | cfg.i2c_adap = &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap; |
351 | cfg.i2c_addr = addr; | 351 | cfg.i2c_addr = addr; |
352 | 352 | ||
353 | if (!dev->dvb->frontend) { | 353 | if (!dev->dvb->frontend) { |
@@ -573,7 +573,7 @@ static int dvb_init(struct cx231xx *dev) | |||
573 | 573 | ||
574 | dev->dvb->frontend = dvb_attach(s5h1432_attach, | 574 | dev->dvb->frontend = dvb_attach(s5h1432_attach, |
575 | &dvico_s5h1432_config, | 575 | &dvico_s5h1432_config, |
576 | &dev->i2c_bus[2].i2c_adap); | 576 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); |
577 | 577 | ||
578 | if (dev->dvb->frontend == NULL) { | 578 | if (dev->dvb->frontend == NULL) { |
579 | printk(DRIVER_NAME | 579 | printk(DRIVER_NAME |
@@ -586,7 +586,7 @@ static int dvb_init(struct cx231xx *dev) | |||
586 | dvb->frontend->callback = cx231xx_tuner_callback; | 586 | dvb->frontend->callback = cx231xx_tuner_callback; |
587 | 587 | ||
588 | if (!dvb_attach(xc5000_attach, dev->dvb->frontend, | 588 | if (!dvb_attach(xc5000_attach, dev->dvb->frontend, |
589 | &dev->i2c_bus[1].i2c_adap, | 589 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
590 | &cnxt_rde250_tunerconfig)) { | 590 | &cnxt_rde250_tunerconfig)) { |
591 | result = -EINVAL; | 591 | result = -EINVAL; |
592 | goto out_free; | 592 | goto out_free; |
@@ -598,7 +598,7 @@ static int dvb_init(struct cx231xx *dev) | |||
598 | 598 | ||
599 | dev->dvb->frontend = dvb_attach(s5h1411_attach, | 599 | dev->dvb->frontend = dvb_attach(s5h1411_attach, |
600 | &xc5000_s5h1411_config, | 600 | &xc5000_s5h1411_config, |
601 | &dev->i2c_bus[2].i2c_adap); | 601 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); |
602 | 602 | ||
603 | if (dev->dvb->frontend == NULL) { | 603 | if (dev->dvb->frontend == NULL) { |
604 | printk(DRIVER_NAME | 604 | printk(DRIVER_NAME |
@@ -611,7 +611,7 @@ static int dvb_init(struct cx231xx *dev) | |||
611 | dvb->frontend->callback = cx231xx_tuner_callback; | 611 | dvb->frontend->callback = cx231xx_tuner_callback; |
612 | 612 | ||
613 | if (!dvb_attach(xc5000_attach, dev->dvb->frontend, | 613 | if (!dvb_attach(xc5000_attach, dev->dvb->frontend, |
614 | &dev->i2c_bus[1].i2c_adap, | 614 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
615 | &cnxt_rdu250_tunerconfig)) { | 615 | &cnxt_rdu250_tunerconfig)) { |
616 | result = -EINVAL; | 616 | result = -EINVAL; |
617 | goto out_free; | 617 | goto out_free; |
@@ -621,7 +621,7 @@ static int dvb_init(struct cx231xx *dev) | |||
621 | 621 | ||
622 | dev->dvb->frontend = dvb_attach(s5h1432_attach, | 622 | dev->dvb->frontend = dvb_attach(s5h1432_attach, |
623 | &dvico_s5h1432_config, | 623 | &dvico_s5h1432_config, |
624 | &dev->i2c_bus[2].i2c_adap); | 624 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); |
625 | 625 | ||
626 | if (dev->dvb->frontend == NULL) { | 626 | if (dev->dvb->frontend == NULL) { |
627 | printk(DRIVER_NAME | 627 | printk(DRIVER_NAME |
@@ -634,7 +634,7 @@ static int dvb_init(struct cx231xx *dev) | |||
634 | dvb->frontend->callback = cx231xx_tuner_callback; | 634 | dvb->frontend->callback = cx231xx_tuner_callback; |
635 | 635 | ||
636 | if (!dvb_attach(tda18271_attach, dev->dvb->frontend, | 636 | if (!dvb_attach(tda18271_attach, dev->dvb->frontend, |
637 | 0x60, &dev->i2c_bus[1].i2c_adap, | 637 | 0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
638 | &cnxt_rde253s_tunerconfig)) { | 638 | &cnxt_rde253s_tunerconfig)) { |
639 | result = -EINVAL; | 639 | result = -EINVAL; |
640 | goto out_free; | 640 | goto out_free; |
@@ -644,7 +644,7 @@ static int dvb_init(struct cx231xx *dev) | |||
644 | 644 | ||
645 | dev->dvb->frontend = dvb_attach(s5h1411_attach, | 645 | dev->dvb->frontend = dvb_attach(s5h1411_attach, |
646 | &tda18271_s5h1411_config, | 646 | &tda18271_s5h1411_config, |
647 | &dev->i2c_bus[2].i2c_adap); | 647 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); |
648 | 648 | ||
649 | if (dev->dvb->frontend == NULL) { | 649 | if (dev->dvb->frontend == NULL) { |
650 | printk(DRIVER_NAME | 650 | printk(DRIVER_NAME |
@@ -657,7 +657,7 @@ static int dvb_init(struct cx231xx *dev) | |||
657 | dvb->frontend->callback = cx231xx_tuner_callback; | 657 | dvb->frontend->callback = cx231xx_tuner_callback; |
658 | 658 | ||
659 | if (!dvb_attach(tda18271_attach, dev->dvb->frontend, | 659 | if (!dvb_attach(tda18271_attach, dev->dvb->frontend, |
660 | 0x60, &dev->i2c_bus[1].i2c_adap, | 660 | 0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
661 | &cnxt_rde253s_tunerconfig)) { | 661 | &cnxt_rde253s_tunerconfig)) { |
662 | result = -EINVAL; | 662 | result = -EINVAL; |
663 | goto out_free; | 663 | goto out_free; |
@@ -666,11 +666,11 @@ static int dvb_init(struct cx231xx *dev) | |||
666 | case CX231XX_BOARD_HAUPPAUGE_EXETER: | 666 | case CX231XX_BOARD_HAUPPAUGE_EXETER: |
667 | 667 | ||
668 | printk(KERN_INFO "%s: looking for tuner / demod on i2c bus: %d\n", | 668 | printk(KERN_INFO "%s: looking for tuner / demod on i2c bus: %d\n", |
669 | __func__, i2c_adapter_id(&dev->i2c_bus[1].i2c_adap)); | 669 | __func__, i2c_adapter_id(&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap)); |
670 | 670 | ||
671 | dev->dvb->frontend = dvb_attach(lgdt3305_attach, | 671 | dev->dvb->frontend = dvb_attach(lgdt3305_attach, |
672 | &hcw_lgdt3305_config, | 672 | &hcw_lgdt3305_config, |
673 | &dev->i2c_bus[1].i2c_adap); | 673 | &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap); |
674 | 674 | ||
675 | if (dev->dvb->frontend == NULL) { | 675 | if (dev->dvb->frontend == NULL) { |
676 | printk(DRIVER_NAME | 676 | printk(DRIVER_NAME |
@@ -683,7 +683,7 @@ static int dvb_init(struct cx231xx *dev) | |||
683 | dvb->frontend->callback = cx231xx_tuner_callback; | 683 | dvb->frontend->callback = cx231xx_tuner_callback; |
684 | 684 | ||
685 | dvb_attach(tda18271_attach, dev->dvb->frontend, | 685 | dvb_attach(tda18271_attach, dev->dvb->frontend, |
686 | 0x60, &dev->i2c_bus[1].i2c_adap, | 686 | 0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, |
687 | &hcw_tda18271_config); | 687 | &hcw_tda18271_config); |
688 | break; | 688 | break; |
689 | 689 | ||