diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2009-01-19 14:01:24 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 19:42:35 +0400 |
commit | aaf50d7d0e12ec797dc0677c4fc853839bdcf07d (patch) | |
tree | 7f37b0e8d20d4a87623968927769cfb27f676847 /drivers/media/video/saa7134/saa7134-cards.c | |
parent | 9a909447d3af6917bf2f7eaae08af0c9e1c3593e (diff) | |
download | linux-aaf50d7d0e12ec797dc0677c4fc853839bdcf07d.tar.xz |
V4L/DVB (10394): KWorld ATSC 115 all static
saa7134: Fix tuner access on Kworld ATSC110
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-cards.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 0d50d7448fc5..42684d162040 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c @@ -5896,6 +5896,32 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data) /* ----------------------------------------------------------- */ +static void nxt200x_gate_ctrl(struct saa7134_dev *dev, int open) +{ + /* enable tuner */ + int i; + static const u8 buffer [][2] = { + { 0x10, 0x12 }, + { 0x13, 0x04 }, + { 0x16, 0x00 }, + { 0x14, 0x04 }, + { 0x17, 0x00 }, + }; + + dev->i2c_client.addr = 0x0a; + + /* FIXME: don't know how to close the i2c gate on NXT200x */ + if (!open) + return; + + for (i = 0; i < ARRAY_SIZE(buffer); i++) + if (2 != i2c_master_send(&dev->i2c_client, + &buffer[i][0], ARRAY_SIZE(buffer[0]))) + printk(KERN_WARNING + "%s: Unable to enable tuner(%i).\n", + dev->name, i); +} + int saa7134_board_init1(struct saa7134_dev *dev) { /* Always print gpio, often manufacturers encode tuner type and other info. */ @@ -6089,6 +6115,10 @@ int saa7134_board_init1(struct saa7134_dev *dev) "are supported for now.\n", dev->name, card(dev).name, dev->name); break; + case SAA7134_BOARD_ADS_INSTANT_HDTV_PCI: + case SAA7134_BOARD_KWORLD_ATSC110: + dev->gate_ctrl = nxt200x_gate_ctrl; + break; } return 0; } @@ -6350,22 +6380,6 @@ int saa7134_board_init2(struct saa7134_dev *dev) i2c_transfer(&dev->i2c_adap, &msg, 1); break; } - case SAA7134_BOARD_ADS_INSTANT_HDTV_PCI: - case SAA7134_BOARD_KWORLD_ATSC110: - { - /* enable tuner */ - int i; - static const u8 buffer [] = { 0x10, 0x12, 0x13, 0x04, 0x16, - 0x00, 0x14, 0x04, 0x17, 0x00 }; - dev->i2c_client.addr = 0x0a; - for (i = 0; i < 5; i++) - if (2 != i2c_master_send(&dev->i2c_client, - &buffer[i*2], 2)) - printk(KERN_WARNING - "%s: Unable to enable tuner(%i).\n", - dev->name, i); - break; - } case SAA7134_BOARD_VIDEOMATE_DVBT_200: case SAA7134_BOARD_VIDEOMATE_DVBT_200A: /* The T200 and the T200A share the same pci id. Consequently, |