summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-01-05 14:55:45 -0500
committerSteven Toth <stoth@hauppauge.com>2008-01-05 14:55:45 -0500
commit5240604a62cc6c8206ed6bf09646c574bdf9b54c (patch)
tree01f9b93dfb527f8d9229b12f3e1edcb1ff4d924c /linux/drivers/media/video/cx23885/cx23885-cards.c
parent1fb17dcd6513daf99c761c3fbf1d0de8a0170d43 (diff)
downloadmediapointer-dvb-s2-5240604a62cc6c8206ed6bf09646c574bdf9b54c.tar.gz
mediapointer-dvb-s2-5240604a62cc6c8206ed6bf09646c574bdf9b54c.tar.bz2
XC5000: Fix support for HVR1500Q broken by patch 1
From: Steven Toth <stoth@hauppauge.com> From Zhang: This patch fixes support for the HVR1500Q which was broken when the xc5000 analog patch was added. Signed-off-by: Chaogui Zhang <czhang1974@gmail.com> Patch committed as-is, cleanups to follows .... Steve Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-cards.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-cards.c b/linux/drivers/media/video/cx23885/cx23885-cards.c
index 36d9b6a4a..f7c504b5a 100644
--- a/linux/drivers/media/video/cx23885/cx23885-cards.c
+++ b/linux/drivers/media/video/cx23885/cx23885-cards.c
@@ -245,6 +245,34 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
dev->name, tv.model);
}
+/* Tuner callback function for cx23885 boards. Currently only needed
+ * for HVR1500Q, which has an xc5000 tuner.
+ */
+int cx23885_tuner_callback(void *i2c_bus, int command, int arg)
+{
+ struct cx23885_i2c *bus = i2c_bus;
+ struct cx23885_dev *dev = bus->dev;
+
+ switch(dev->board) {
+ case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
+ if(command == 0) { /* Tuner Reset Command from xc5000 */
+ /* Drive the tuner into reset and out */
+ cx_clear(GP0_IO, 0x00000004);
+ mdelay(200);
+ cx_set(GP0_IO, 0x00000004);
+ return 0;
+ }
+ else {
+ printk(KERN_ERR
+ "%s(): Unknow command.\n", __FUNCTION__);
+ return -EINVAL;
+ }
+ break;
+ }
+
+ return 0; /* Should never be here */
+}
+EXPORT_SYMBOL(cx23885_tuner_callback);
void cx23885_gpio_setup(struct cx23885_dev *dev)
{
switch(dev->board) {