diff options
author | Andreas Regel <andreas.regel@gmx.de> | 2009-04-23 13:59:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:41 -0400 |
commit | 62ad7c11883ab7b4642da7d220a2bee7a37e3bad (patch) | |
tree | 5af7df17dd80905db37b4ce8079064690bdfc251 /drivers/media/dvb/ttpci | |
parent | cbc320d2782cbb0c19e67522167843d9eb738722 (diff) |
V4L/DVB (11599): S2-1600: Use budget driver instead of budged-ci
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 86 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 85 |
2 files changed, 85 insertions, 86 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 351481d4c383..371a71616810 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -53,9 +53,6 @@ | |||
53 | #include "bsru6.h" | 53 | #include "bsru6.h" |
54 | #include "tda1002x.h" | 54 | #include "tda1002x.h" |
55 | #include "tda827x.h" | 55 | #include "tda827x.h" |
56 | #include "stv6110x.h" | ||
57 | #include "stv090x.h" | ||
58 | #include "isl6423.h" | ||
59 | 56 | ||
60 | /* | 57 | /* |
61 | * Regarding DEBIADDR_IR: | 58 | * Regarding DEBIADDR_IR: |
@@ -1349,44 +1346,6 @@ static struct stb6100_config tt3200_stb6100_config = { | |||
1349 | .refclock = 27000000, | 1346 | .refclock = 27000000, |
1350 | }; | 1347 | }; |
1351 | 1348 | ||
1352 | static struct stv090x_config tt1600_stv090x_config = { | ||
1353 | .device = STV0903, | ||
1354 | .demod_mode = STV090x_SINGLE, | ||
1355 | .clk_mode = STV090x_CLK_EXT, | ||
1356 | |||
1357 | .xtal = 27000000, | ||
1358 | .address = 0x68, | ||
1359 | .ref_clk = 27000000, | ||
1360 | |||
1361 | .ts1_mode = STV090x_TSMODE_PARALLEL_PUNCTURED, | ||
1362 | .ts2_mode = STV090x_TSMODE_SERIAL_PUNCTURED, | ||
1363 | |||
1364 | .repeater_level = STV090x_RPTLEVEL_16, | ||
1365 | |||
1366 | .tuner_init = NULL, | ||
1367 | .tuner_set_mode = NULL, | ||
1368 | .tuner_set_frequency = NULL, | ||
1369 | .tuner_get_frequency = NULL, | ||
1370 | .tuner_set_bandwidth = NULL, | ||
1371 | .tuner_get_bandwidth = NULL, | ||
1372 | .tuner_set_bbgain = NULL, | ||
1373 | .tuner_get_bbgain = NULL, | ||
1374 | .tuner_set_refclk = NULL, | ||
1375 | .tuner_get_status = NULL, | ||
1376 | }; | ||
1377 | |||
1378 | static struct stv6110x_config tt1600_stv6110x_config = { | ||
1379 | .addr = 0x60, | ||
1380 | .refclk = 27000000, | ||
1381 | }; | ||
1382 | |||
1383 | static struct isl6423_config tt1600_isl6423_config = { | ||
1384 | .current_max = SEC_CURRENT_515m, | ||
1385 | .curlim = SEC_CURRENT_LIM_ON, | ||
1386 | .mod_extern = 1, | ||
1387 | .addr = 0x08, | ||
1388 | }; | ||
1389 | |||
1390 | static void frontend_init(struct budget_ci *budget_ci) | 1349 | static void frontend_init(struct budget_ci *budget_ci) |
1391 | { | 1350 | { |
1392 | switch (budget_ci->budget.dev->pci->subsystem_device) { | 1351 | switch (budget_ci->budget.dev->pci->subsystem_device) { |
@@ -1506,49 +1465,6 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1506 | } | 1465 | } |
1507 | break; | 1466 | break; |
1508 | 1467 | ||
1509 | case 0x101c: { /* TT S2-1600 */ | ||
1510 | struct stv6110x_devctl *ctl; | ||
1511 | /* TODO! must verify with Andreas */ | ||
1512 | saa7146_setgpio(budget_ci->budget.dev, 2, SAA7146_GPIO_OUTLO); | ||
1513 | msleep(50); | ||
1514 | saa7146_setgpio(budget_ci->budget.dev, 2, SAA7146_GPIO_OUTHI); | ||
1515 | msleep(250); | ||
1516 | |||
1517 | budget_ci->budget.dvb_frontend = dvb_attach(stv090x_attach, | ||
1518 | &tt1600_stv090x_config, | ||
1519 | &budget_ci->budget.i2c_adap, | ||
1520 | STV090x_DEMODULATOR_0); | ||
1521 | |||
1522 | if (budget_ci->budget.dvb_frontend) { | ||
1523 | |||
1524 | ctl = dvb_attach(stv6110x_attach, | ||
1525 | budget_ci->budget.dvb_frontend, | ||
1526 | &tt1600_stv6110x_config, | ||
1527 | &budget_ci->budget.i2c_adap); | ||
1528 | |||
1529 | tt1600_stv090x_config.tuner_init = ctl->tuner_init; | ||
1530 | tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode; | ||
1531 | tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency; | ||
1532 | tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency; | ||
1533 | tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth; | ||
1534 | tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth; | ||
1535 | tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain; | ||
1536 | tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain; | ||
1537 | tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; | ||
1538 | tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; | ||
1539 | |||
1540 | dvb_attach(isl6423_attach, | ||
1541 | budget_ci->budget.dvb_frontend, | ||
1542 | &budget_ci->budget.i2c_adap, | ||
1543 | &tt1600_isl6423_config); | ||
1544 | |||
1545 | } else { | ||
1546 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); | ||
1547 | budget_ci->budget.dvb_frontend = NULL; | ||
1548 | } | ||
1549 | } | ||
1550 | break; | ||
1551 | |||
1552 | } | 1468 | } |
1553 | 1469 | ||
1554 | if (budget_ci->budget.dvb_frontend == NULL) { | 1470 | if (budget_ci->budget.dvb_frontend == NULL) { |
@@ -1640,7 +1556,6 @@ MAKE_BUDGET_INFO(ttbtci, "TT-Budget-T-CI PCI", BUDGET_TT); | |||
1640 | MAKE_BUDGET_INFO(ttbcci, "TT-Budget-C-CI PCI", BUDGET_TT); | 1556 | MAKE_BUDGET_INFO(ttbcci, "TT-Budget-C-CI PCI", BUDGET_TT); |
1641 | MAKE_BUDGET_INFO(ttc1501, "TT-Budget C-1501 PCI", BUDGET_TT); | 1557 | MAKE_BUDGET_INFO(ttc1501, "TT-Budget C-1501 PCI", BUDGET_TT); |
1642 | MAKE_BUDGET_INFO(tt3200, "TT-Budget S2-3200 PCI", BUDGET_TT); | 1558 | MAKE_BUDGET_INFO(tt3200, "TT-Budget S2-3200 PCI", BUDGET_TT); |
1643 | MAKE_BUDGET_INFO(tt1600, "TT-Budget S2-1600 PCI", BUDGET_TT); | ||
1644 | 1559 | ||
1645 | static struct pci_device_id pci_tbl[] = { | 1560 | static struct pci_device_id pci_tbl[] = { |
1646 | MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), | 1561 | MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), |
@@ -1651,7 +1566,6 @@ static struct pci_device_id pci_tbl[] = { | |||
1651 | MAKE_EXTENSION_PCI(ttbs2, 0x13c2, 0x1017), | 1566 | MAKE_EXTENSION_PCI(ttbs2, 0x13c2, 0x1017), |
1652 | MAKE_EXTENSION_PCI(ttc1501, 0x13c2, 0x101a), | 1567 | MAKE_EXTENSION_PCI(ttc1501, 0x13c2, 0x101a), |
1653 | MAKE_EXTENSION_PCI(tt3200, 0x13c2, 0x1019), | 1568 | MAKE_EXTENSION_PCI(tt3200, 0x13c2, 0x1019), |
1654 | MAKE_EXTENSION_PCI(tt1600, 0x13c2, 0x101c), | ||
1655 | { | 1569 | { |
1656 | .vendor = 0, | 1570 | .vendor = 0, |
1657 | } | 1571 | } |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 83e9e7750c8c..07dced4e7e86 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -47,6 +47,9 @@ | |||
47 | #include "bsru6.h" | 47 | #include "bsru6.h" |
48 | #include "bsbe1.h" | 48 | #include "bsbe1.h" |
49 | #include "tdhd1.h" | 49 | #include "tdhd1.h" |
50 | #include "stv6110x.h" | ||
51 | #include "stv090x.h" | ||
52 | #include "isl6423.h" | ||
50 | 53 | ||
51 | static int diseqc_method; | 54 | static int diseqc_method; |
52 | module_param(diseqc_method, int, 0444); | 55 | module_param(diseqc_method, int, 0444); |
@@ -425,6 +428,44 @@ static u8 read_pwm(struct budget* budget) | |||
425 | return pwm; | 428 | return pwm; |
426 | } | 429 | } |
427 | 430 | ||
431 | static struct stv090x_config tt1600_stv090x_config = { | ||
432 | .device = STV0903, | ||
433 | .demod_mode = STV090x_SINGLE, | ||
434 | .clk_mode = STV090x_CLK_EXT, | ||
435 | |||
436 | .xtal = 27000000, | ||
437 | .address = 0x68, | ||
438 | .ref_clk = 27000000, | ||
439 | |||
440 | .ts1_mode = STV090x_TSMODE_PARALLEL_PUNCTURED, | ||
441 | .ts2_mode = STV090x_TSMODE_SERIAL_PUNCTURED, | ||
442 | |||
443 | .repeater_level = STV090x_RPTLEVEL_16, | ||
444 | |||
445 | .tuner_init = NULL, | ||
446 | .tuner_set_mode = NULL, | ||
447 | .tuner_set_frequency = NULL, | ||
448 | .tuner_get_frequency = NULL, | ||
449 | .tuner_set_bandwidth = NULL, | ||
450 | .tuner_get_bandwidth = NULL, | ||
451 | .tuner_set_bbgain = NULL, | ||
452 | .tuner_get_bbgain = NULL, | ||
453 | .tuner_set_refclk = NULL, | ||
454 | .tuner_get_status = NULL, | ||
455 | }; | ||
456 | |||
457 | static struct stv6110x_config tt1600_stv6110x_config = { | ||
458 | .addr = 0x60, | ||
459 | .refclk = 27000000, | ||
460 | }; | ||
461 | |||
462 | static struct isl6423_config tt1600_isl6423_config = { | ||
463 | .current_max = SEC_CURRENT_515m, | ||
464 | .curlim = SEC_CURRENT_LIM_ON, | ||
465 | .mod_extern = 1, | ||
466 | .addr = 0x08, | ||
467 | }; | ||
468 | |||
428 | static void frontend_init(struct budget *budget) | 469 | static void frontend_init(struct budget *budget) |
429 | { | 470 | { |
430 | (void)alps_bsbe1_config; /* avoid warning */ | 471 | (void)alps_bsbe1_config; /* avoid warning */ |
@@ -566,6 +607,48 @@ static void frontend_init(struct budget *budget) | |||
566 | } | 607 | } |
567 | break; | 608 | break; |
568 | } | 609 | } |
610 | |||
611 | case 0x101c: { /* TT S2-1600 */ | ||
612 | struct stv6110x_devctl *ctl; | ||
613 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); | ||
614 | msleep(50); | ||
615 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); | ||
616 | msleep(250); | ||
617 | |||
618 | budget->dvb_frontend = dvb_attach(stv090x_attach, | ||
619 | &tt1600_stv090x_config, | ||
620 | &budget->i2c_adap, | ||
621 | STV090x_DEMODULATOR_0); | ||
622 | |||
623 | if (budget->dvb_frontend) { | ||
624 | |||
625 | ctl = dvb_attach(stv6110x_attach, | ||
626 | budget->dvb_frontend, | ||
627 | &tt1600_stv6110x_config, | ||
628 | &budget->i2c_adap); | ||
629 | |||
630 | tt1600_stv090x_config.tuner_init = ctl->tuner_init; | ||
631 | tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode; | ||
632 | tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency; | ||
633 | tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency; | ||
634 | tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth; | ||
635 | tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth; | ||
636 | tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain; | ||
637 | tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain; | ||
638 | tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk; | ||
639 | tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status; | ||
640 | |||
641 | dvb_attach(isl6423_attach, | ||
642 | budget->dvb_frontend, | ||
643 | &budget->i2c_adap, | ||
644 | &tt1600_isl6423_config); | ||
645 | |||
646 | } else { | ||
647 | dvb_frontend_detach(budget->dvb_frontend); | ||
648 | budget->dvb_frontend = NULL; | ||
649 | } | ||
650 | } | ||
651 | break; | ||
569 | } | 652 | } |
570 | 653 | ||
571 | if (budget->dvb_frontend == NULL) { | 654 | if (budget->dvb_frontend == NULL) { |
@@ -641,6 +724,7 @@ MAKE_BUDGET_INFO(ttbc, "TT-Budget/WinTV-NOVA-C PCI", BUDGET_TT); | |||
641 | MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); | 724 | MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); |
642 | MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); | 725 | MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); |
643 | MAKE_BUDGET_INFO(ttbs1401, "TT-Budget-S-1401 PCI", BUDGET_TT); | 726 | MAKE_BUDGET_INFO(ttbs1401, "TT-Budget-S-1401 PCI", BUDGET_TT); |
727 | MAKE_BUDGET_INFO(tt1600, "TT-Budget S2-1600 PCI", BUDGET_TT); | ||
644 | MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY); | 728 | MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY); |
645 | MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); | 729 | MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); |
646 | MAKE_BUDGET_INFO(fsact, "Fujitsu Siemens Activy Budget-T PCI (rev GR/Grundig frontend)", BUDGET_FS_ACTIVY); | 730 | MAKE_BUDGET_INFO(fsact, "Fujitsu Siemens Activy Budget-T PCI (rev GR/Grundig frontend)", BUDGET_FS_ACTIVY); |
@@ -653,6 +737,7 @@ static struct pci_device_id pci_tbl[] = { | |||
653 | MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), | 737 | MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), |
654 | MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1016), | 738 | MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1016), |
655 | MAKE_EXTENSION_PCI(ttbs1401, 0x13c2, 0x1018), | 739 | MAKE_EXTENSION_PCI(ttbs1401, 0x13c2, 0x1018), |
740 | MAKE_EXTENSION_PCI(tt1600, 0x13c2, 0x101c), | ||
656 | MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60), | 741 | MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60), |
657 | MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), | 742 | MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), |
658 | MAKE_EXTENSION_PCI(fsact1, 0x1131, 0x5f60), | 743 | MAKE_EXTENSION_PCI(fsact1, 0x1131, 0x5f60), |