aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-04-06 14:45:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:20:37 -0400
commite415c689a8842670e161581f060575c14957f073 (patch)
treeed18153bcad93a377f0ab6b5ac27554de9a9b614 /drivers/media/dvb/ttpci
parent2460cdac94082c7046ab595bf643338e6faed6cb (diff)
V4L/DVB (11579): Initial go at TT S2-1600
[mchehab@redhat.com: fix compilation when the new drivers aren't selected] 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.c83
1 files changed, 83 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index 371a71616810..2ee03206dc8c 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -53,6 +53,9 @@
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"
56 59
57/* 60/*
58 * Regarding DEBIADDR_IR: 61 * Regarding DEBIADDR_IR:
@@ -1346,6 +1349,41 @@ static struct stb6100_config tt3200_stb6100_config = {
1346 .refclock = 27000000, 1349 .refclock = 27000000,
1347}; 1350};
1348 1351
1352static struct stv090x_config tt1600_stv090x_config = {
1353 .device = STV0903,
1354 .demod_mode = STV090x_SINGLE,
1355 .clk_mode = STV090x_CLK_INT,
1356
1357 .xtal = 8000000,
1358 .address = 0x68,
1359 .ref_clk = 16000000,
1360
1361 .ts1_mode = STV090x_TSMODE_DVBCI,
1362 .ts2_mode = STV090x_TSMODE_DVBCI,
1363
1364 .tuner_init = NULL,
1365 .tuner_set_mode = NULL,
1366 .tuner_set_frequency = NULL,
1367 .tuner_get_frequency = NULL,
1368 .tuner_set_bandwidth = NULL,
1369 .tuner_get_bandwidth = NULL,
1370 .tuner_set_bbgain = NULL,
1371 .tuner_get_bbgain = NULL,
1372 .tuner_set_refclk = NULL,
1373 .tuner_get_status = NULL,
1374};
1375
1376static struct stv6110x_config tt1600_stv6110x_config = {
1377 .addr = 0x60,
1378 .refclk = 16000000,
1379};
1380
1381static struct isl6423_config tt1600_isl6423_config = {
1382 .current_max = SEC_CURRENT_800m,
1383 .curlim = SEC_CURRENT_LIM_ON,
1384 .addr = 0x08,
1385};
1386
1349static void frontend_init(struct budget_ci *budget_ci) 1387static void frontend_init(struct budget_ci *budget_ci)
1350{ 1388{
1351 switch (budget_ci->budget.dev->pci->subsystem_device) { 1389 switch (budget_ci->budget.dev->pci->subsystem_device) {
@@ -1465,6 +1503,49 @@ static void frontend_init(struct budget_ci *budget_ci)
1465 } 1503 }
1466 break; 1504 break;
1467 1505
1506 case 0x101c: { /* TT S2-1600 */
1507 struct stv6110x_devctl *ctl;
1508 /* TODO! must verify with Andreas */
1509 saa7146_setgpio(budget_ci->budget.dev, 2, SAA7146_GPIO_OUTLO);
1510 msleep(50);
1511 saa7146_setgpio(budget_ci->budget.dev, 2, SAA7146_GPIO_OUTHI);
1512 msleep(250);
1513
1514 budget_ci->budget.dvb_frontend = dvb_attach(stv090x_attach,
1515 &tt1600_stv090x_config,
1516 &budget_ci->budget.i2c_adap,
1517 STV090x_DEMODULATOR_0);
1518
1519 if (budget_ci->budget.dvb_frontend) {
1520
1521 ctl = dvb_attach(stv6110x_attach,
1522 budget_ci->budget.dvb_frontend,
1523 &tt1600_stv6110x_config,
1524 &budget_ci->budget.i2c_adap);
1525
1526 tt1600_stv090x_config.tuner_init = ctl->tuner_init;
1527 tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode;
1528 tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency;
1529 tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency;
1530 tt1600_stv090x_config.tuner_set_bandwidth = ctl->tuner_set_bandwidth;
1531 tt1600_stv090x_config.tuner_get_bandwidth = ctl->tuner_get_bandwidth;
1532 tt1600_stv090x_config.tuner_set_bbgain = ctl->tuner_set_bbgain;
1533 tt1600_stv090x_config.tuner_get_bbgain = ctl->tuner_get_bbgain;
1534 tt1600_stv090x_config.tuner_set_refclk = ctl->tuner_set_refclk;
1535 tt1600_stv090x_config.tuner_get_status = ctl->tuner_get_status;
1536
1537 dvb_attach(isl6423_attach,
1538 budget_ci->budget.dvb_frontend,
1539 &budget_ci->budget.i2c_adap,
1540 &tt1600_isl6423_config);
1541
1542 } else {
1543 dvb_frontend_detach(budget_ci->budget.dvb_frontend);
1544 budget_ci->budget.dvb_frontend = NULL;
1545 }
1546 }
1547 break;
1548
1468 } 1549 }
1469 1550
1470 if (budget_ci->budget.dvb_frontend == NULL) { 1551 if (budget_ci->budget.dvb_frontend == NULL) {
@@ -1556,6 +1637,7 @@ MAKE_BUDGET_INFO(ttbtci, "TT-Budget-T-CI PCI", BUDGET_TT);
1556MAKE_BUDGET_INFO(ttbcci, "TT-Budget-C-CI PCI", BUDGET_TT); 1637MAKE_BUDGET_INFO(ttbcci, "TT-Budget-C-CI PCI", BUDGET_TT);
1557MAKE_BUDGET_INFO(ttc1501, "TT-Budget C-1501 PCI", BUDGET_TT); 1638MAKE_BUDGET_INFO(ttc1501, "TT-Budget C-1501 PCI", BUDGET_TT);
1558MAKE_BUDGET_INFO(tt3200, "TT-Budget S2-3200 PCI", BUDGET_TT); 1639MAKE_BUDGET_INFO(tt3200, "TT-Budget S2-3200 PCI", BUDGET_TT);
1640MAKE_BUDGET_INFO(tt1600, "TT-Budget S2-1600 PCI", BUDGET_TT);
1559 1641
1560static struct pci_device_id pci_tbl[] = { 1642static struct pci_device_id pci_tbl[] = {
1561 MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), 1643 MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c),
@@ -1566,6 +1648,7 @@ static struct pci_device_id pci_tbl[] = {
1566 MAKE_EXTENSION_PCI(ttbs2, 0x13c2, 0x1017), 1648 MAKE_EXTENSION_PCI(ttbs2, 0x13c2, 0x1017),
1567 MAKE_EXTENSION_PCI(ttc1501, 0x13c2, 0x101a), 1649 MAKE_EXTENSION_PCI(ttc1501, 0x13c2, 0x101a),
1568 MAKE_EXTENSION_PCI(tt3200, 0x13c2, 0x1019), 1650 MAKE_EXTENSION_PCI(tt3200, 0x13c2, 0x1019),
1651 MAKE_EXTENSION_PCI(tt1600, 0x13c2, 0x101c),
1569 { 1652 {
1570 .vendor = 0, 1653 .vendor = 0,
1571 } 1654 }