V4L/DVB (8470): cx23885: Add DViCO HDTV7 Dual Express tuner callback support.
Ensure the correct tuner gets reset on demand. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
1ecc5aed1e
commit
6df516905b
@ -326,25 +326,41 @@ int cx23885_tuner_callback(void *priv, int command, int arg)
|
|||||||
{
|
{
|
||||||
struct cx23885_i2c *bus = priv;
|
struct cx23885_i2c *bus = priv;
|
||||||
struct cx23885_dev *dev = bus->dev;
|
struct cx23885_dev *dev = bus->dev;
|
||||||
|
u32 bitmask = 0;
|
||||||
|
|
||||||
|
if (command != 0) {
|
||||||
|
printk(KERN_ERR "%s(): Unknown command 0x%x.\n",
|
||||||
|
__func__, command);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
switch(dev->board) {
|
switch(dev->board) {
|
||||||
case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
|
case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
|
||||||
if(command == 0) { /* Tuner Reset Command from xc5000 */
|
/* Tuner Reset Command from xc5000 */
|
||||||
/* Drive the tuner into reset and out */
|
if (command == 0)
|
||||||
cx_clear(GP0_IO, 0x00000004);
|
bitmask = 0x04;
|
||||||
mdelay(200);
|
break;
|
||||||
cx_set(GP0_IO, 0x00000004);
|
case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
|
||||||
return 0;
|
if (command == 0) {
|
||||||
}
|
|
||||||
else {
|
/* Two identical tuners on two different i2c buses,
|
||||||
printk(KERN_ERR
|
* we need to reset the correct gpio. */
|
||||||
"%s(): Unknow command.\n", __func__);
|
if (bus->nr == 0)
|
||||||
return -EINVAL;
|
bitmask = 0x01;
|
||||||
|
else if (bus->nr == 1)
|
||||||
|
bitmask = 0x04;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* Should never be here */
|
if (bitmask) {
|
||||||
|
/* Drive the tuner into reset and back out */
|
||||||
|
cx_clear(GP0_IO, bitmask);
|
||||||
|
mdelay(200);
|
||||||
|
cx_set(GP0_IO, bitmask);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cx23885_gpio_setup(struct cx23885_dev *dev)
|
void cx23885_gpio_setup(struct cx23885_dev *dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user