Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14097
b: refs/heads/master
c: 6c6c0b2
h: refs/heads/master
i:
  14095: eb3eeae
v: v3
  • Loading branch information
Mark Weaver authored and Linus Torvalds committed Nov 14, 2005
1 parent 1901946 commit 743f9c4
Show file tree
Hide file tree
Showing 7 changed files with 318 additions and 7 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: 871242b93e75b24c99687249c2812aed026b40af
refs/heads/master: 6c6c0b2c27e70c3593e023882fabb1cebcbd077e
5 changes: 5 additions & 0 deletions trunk/drivers/media/video/bttv-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,10 @@ struct tvcard bttv_tvcards[] = {
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.has_dvb = 1,
.has_remote = 1,
.gpiomask = 0x1b,
.no_gpioirq = 1,
.any_irq = 1,
},
[BTTV_BOARD_PV143] = {
/* Jorge Boncompte - DTI2 <jorge@dti2.net> */
Expand Down Expand Up @@ -3384,6 +3387,8 @@ void __devinit bttv_init_card2(struct bttv *btv)
btv->has_remote=1;
if (!bttv_tvcards[btv->c.type].no_gpioirq)
btv->gpioirq=1;
if (bttv_tvcards[btv->c.type].any_irq)
btv->any_irq = 1;
if (bttv_tvcards[btv->c.type].audio_hook)
btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook;

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/video/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3667,6 +3667,10 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
int handled = 0;

btv=(struct bttv *)dev_id;

if (btv->any_irq)
handled = bttv_any_irq(&btv->c);

count=0;
while (1) {
/* get/clear interrupt status bits */
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/media/video/bttv-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@ void bttv_gpio_irq(struct bttv_core *core)
}
}

int bttv_any_irq(struct bttv_core *core)
{
struct bttv_sub_driver *drv;
struct bttv_sub_device *dev;
struct list_head *item;
int handled = 0;

list_for_each(item,&core->subs) {
dev = list_entry(item,struct bttv_sub_device,list);
drv = to_bttv_sub_drv(dev->dev.driver);
if (drv && drv->any_irq) {
if (drv->any_irq(dev))
handled = 1;
}
}
return handled;
}

/* ----------------------------------------------------------------------- */
/* external: sub-driver register/unregister */

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/bttv.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ struct tvcard
unsigned int has_dvb:1;
unsigned int has_remote:1;
unsigned int no_gpioirq:1;
unsigned int any_irq:1;

/* other settings */
unsigned int pll;
Expand Down Expand Up @@ -334,6 +335,7 @@ struct bttv_sub_driver {
struct device_driver drv;
char wanted[BUS_ID_SIZE];
void (*gpio_irq)(struct bttv_sub_device *sub);
int (*any_irq)(struct bttv_sub_device *sub);
};
#define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv)

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/bttvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ extern struct bus_type bttv_sub_bus_type;
int bttv_sub_add_device(struct bttv_core *core, char *name);
int bttv_sub_del_devices(struct bttv_core *core);
void bttv_gpio_irq(struct bttv_core *core);
int bttv_any_irq(struct bttv_core *core);


/* ---------------------------------------------------------- */
Expand Down Expand Up @@ -273,6 +274,7 @@ struct bttv {
struct bttv_pll_info pll;
int triton1;
int gpioirq;
int any_irq;
int use_i2c_hw;

/* old gpio interface */
Expand Down
Loading

0 comments on commit 743f9c4

Please sign in to comment.