]> err.no Git - linux-2.6/blobdiff - drivers/media/video/cx23885/cx23885-cards.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6] / drivers / media / video / cx23885 / cx23885-cards.c
index c2d5a4d7228b83f704a8054e1f208b4f58980aeb..2d414dad5c31ac2b9c184459d6d04a6b42746dce 100644 (file)
@@ -244,6 +244,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 *priv, int command, int arg)
+{
+       struct cx23885_i2c *bus = priv;
+       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 */
+}
+
 void cx23885_gpio_setup(struct cx23885_dev *dev)
 {
        switch(dev->board) {