Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113815
b: refs/heads/master
c: 0fbbff3
h: refs/heads/master
i:
  113813: efe83f7
  113811: 2747697
  113807: a0fe733
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 8ce0b38 commit 4dc5901
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad4eada70b2a145aabb1814fdc080480f796decb
refs/heads/master: 0fbbff33fcab605b1a5c53a20c302aad24b082ef
20 changes: 12 additions & 8 deletions trunk/drivers/media/video/cx23885/cx23885-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,9 @@ 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)
static int cx23885_tuner_callback(struct cx23885_dev *dev, int port,
int command, int arg)
{
struct cx23885_i2c *bus = priv;
struct cx23885_dev *dev = bus->dev;
u32 bitmask = 0;

if (command != 0) {
Expand All @@ -345,9 +341,9 @@ int cx23885_tuner_callback(void *priv, int command, int arg)

/* Two identical tuners on two different i2c buses,
* we need to reset the correct gpio. */
if (bus->nr == 0)
if (port == 0)
bitmask = 0x01;
else if (bus->nr == 1)
else if (port == 1)
bitmask = 0x04;
}
break;
Expand All @@ -363,6 +359,14 @@ int cx23885_tuner_callback(void *priv, int command, int arg)
return 0;
}

int cx23885_xc5000_tuner_callback(void *priv, int command, int arg)
{
struct cx23885_i2c *bus = priv;
struct cx23885_dev *dev = bus->dev;

return cx23885_tuner_callback(dev, bus->nr, command, arg);
}

void cx23885_gpio_setup(struct cx23885_dev *dev)
{
switch(dev->board) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx23885/cx23885-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ static struct s5h1411_config dvico_s5h1411_config = {
static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
.i2c_address = 0x61,
.if_khz = 5380,
.tuner_callback = cx23885_tuner_callback
.tuner_callback = cx23885_xc5000_tuner_callback,
};

static struct xc5000_config dvico_xc5000_tunerconfig = {
.i2c_address = 0x64,
.if_khz = 5380,
.tuner_callback = cx23885_tuner_callback
.tuner_callback = cx23885_xc5000_tuner_callback,
};

static struct tda829x_config tda829x_no_probe = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/cx23885/cx23885.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ extern const unsigned int cx23885_bcount;
extern struct cx23885_subid cx23885_subids[];
extern const unsigned int cx23885_idcount;

extern int cx23885_tuner_callback(void *priv, int command, int arg);
extern int cx23885_xc5000_tuner_callback(void *priv, int command, int arg);
extern void cx23885_card_list(struct cx23885_dev *dev);
extern int cx23885_ir_init(struct cx23885_dev *dev);
extern void cx23885_gpio_setup(struct cx23885_dev *dev);
Expand Down

0 comments on commit 4dc5901

Please sign in to comment.