diff options
author | Gerd Knorr <devnull@localhost> | 2004-11-30 17:00:13 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-11-30 17:00:13 +0000 |
commit | 3ab65e59d64a1ab37ad62acd54af78b4f559d990 (patch) | |
tree | 6809d45697c5a78a30af1e378fc7d81c39fc2344 /linux/drivers/media/video/cx88/cx88-core.c | |
parent | cec65069b7466d850408a58576dbff9a0ddbf782 (diff) | |
download | mediapointer-dvb-s2-3ab65e59d64a1ab37ad62acd54af78b4f559d990.tar.gz mediapointer-dvb-s2-3ab65e59d64a1ab37ad62acd54af78b4f559d990.tar.bz2 |
- new cx88-based dvb card by Christopher Pascoe.
- cx88: IR support by Christopher Pascoe and me.
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-core.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 66c33af6b..9bf791d14 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-core.c,v 1.17 2004/11/23 17:29:09 kraxel Exp $ + * $Id: cx88-core.c,v 1.18 2004/11/30 17:00:13 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * driver core @@ -587,10 +587,19 @@ void cx88_print_irqbits(char *name, char *tag, char **strings, /* ------------------------------------------------------------------ */ -void cx88_irq(struct cx88_core *core, u32 status, u32 mask) +int cx88_core_irq(struct cx88_core *core, u32 status) { - cx88_print_irqbits(core->name, "irq pci", - cx88_pci_irqs, status, mask); + int handled = 0; + + if (status & (1<<18)) { + cx88_ir_irq(core); + handled++; + } + if (!handled) + cx88_print_irqbits(core->name, "irq pci", + cx88_pci_irqs, status, + core->pci_irqmask); + return handled; } void cx88_wakeup(struct cx88_core *core, @@ -1090,6 +1099,9 @@ static int get_ressources(struct cx88_core *core, struct pci_dev *pci) return -EBUSY; } +//static int cx88_ir_attach(struct cx88_core *core, struct pci_dev *pci_dev); +//static int cx88_ir_detach(struct cx88_core *core); + struct cx88_core* cx88_core_get(struct pci_dev *pci) { struct cx88_core *core; @@ -1115,9 +1127,10 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) goto fail_unlock; memset(core,0,sizeof(*core)); + atomic_inc(&core->refcount); core->pci_bus = pci->bus->number; core->pci_slot = PCI_SLOT(pci->devfn); - atomic_inc(&core->refcount); + core->pci_irqmask = 0x00fc00; core->nr = cx88_devcount++; sprintf(core->name,"cx88[%d]",core->nr); @@ -1160,6 +1173,8 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) cx88_reset(core); cx88_i2c_init(core,pci); cx88_card_setup(core); + cx88_ir_init(core,pci); + cx_write(MO_PCI_INTMSK, core->pci_irqmask); up(&devlist); return core; @@ -1180,6 +1195,7 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci) return; down(&devlist); + cx88_ir_fini(core); if (0 == core->i2c_rc) i2c_bit_del_bus(&core->i2c_adap); list_del(&core->devlist); @@ -1197,7 +1213,7 @@ EXPORT_SYMBOL(cx88_vid_irqs); EXPORT_SYMBOL(cx88_mpeg_irqs); EXPORT_SYMBOL(cx88_print_irqbits); -EXPORT_SYMBOL(cx88_irq); +EXPORT_SYMBOL(cx88_core_irq); EXPORT_SYMBOL(cx88_wakeup); EXPORT_SYMBOL(cx88_reset); EXPORT_SYMBOL(cx88_shutdown); |