summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-01-04 18:00:25 +0000
committerMichael Hunold <devnull@localhost>2003-01-04 18:00:25 +0000
commitf9baa931e2c4bc43371addc9b654afa06ae325a0 (patch)
tree21be91354e235ed17470ce3ee173e06648ad1db7 /linux/drivers/media/common
parent6ef9b1ac86347c93e5bed9c3dc83893f12c7e0d6 (diff)
downloadmediapointer-dvb-s2-f9baa931e2c4bc43371addc9b654afa06ae325a0.tar.gz
mediapointer-dvb-s2-f9baa931e2c4bc43371addc9b654afa06ae325a0.tar.bz2
Some more changes... (but we're stabilizing...)
2.5.x: - exchanged the Kconfig files for "ttpci" and "ttpci-budget" - removed the "SAA7146 based" from the card descriptions, but put it to the remark some lines above saa7146: - simplified the probe(), attach(), detach() logic, since all dvb devices can be identified by their subvendor/subdevice ids av7110: - added two wait_for_debi_done() calls in gpioirq(). (All other IER_ENABLE() calls are preceded by wait_for_debi_done()) budget: - budget.c has been split up into budget.c and budget-av.c. The latter is for budget cards with analog video (av) inputs. Definitions are now in budget.h. budget.c exports various functions that are used by budget-av.c, too. The av code is currently missing, though, and needs to be added. unsorted: - various c99 initializer cleanups
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/Kconfig4
-rw-r--r--linux/drivers/media/common/saa7146.h10
-rw-r--r--linux/drivers/media/common/saa7146_core.c14
3 files changed, 17 insertions, 11 deletions
diff --git a/linux/drivers/media/common/Kconfig b/linux/drivers/media/common/Kconfig
index 17cb90bc3..87edcbb98 100644
--- a/linux/drivers/media/common/Kconfig
+++ b/linux/drivers/media/common/Kconfig
@@ -1,7 +1,7 @@
config VIDEO_SAA7146
tristate
- default y if DVB_AV7110=y || VIDEO_MXB=y
- default m if DVB_AV7110=m || VIDEO_MXB=m
+ default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y
+ default m if DVB_AV7110=y || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m
depends on VIDEO_DEV && PCI
config VIDEO_VIDEOBUF
diff --git a/linux/drivers/media/common/saa7146.h b/linux/drivers/media/common/saa7146.h
index 972e7774f..907989cfe 100644
--- a/linux/drivers/media/common/saa7146.h
+++ b/linux/drivers/media/common/saa7146.h
@@ -55,7 +55,10 @@ struct saa7146_extension;
struct saa7146_vv;
struct saa7146_sub_info {
- unsigned int subvendor, subdevice;
+ unsigned int subvendor;
+ unsigned int subdevice;
+ char **name;
+ int type;
};
/* saa7146 page table */
@@ -88,8 +91,7 @@ struct saa7146_extension
/* extension functions */
int (*preinit)(struct saa7146_dev*);
int (*probe)(struct saa7146_dev*, unsigned int subvendor, unsigned int subdevice);
-
- int (*attach)(struct saa7146_dev*);
+ int (*attach)(struct saa7146_dev *, struct saa7146_sub_info *);
int (*detach)(struct saa7146_dev*);
u32 irq_mask; /* mask to indicate, which irq-events are handled by the extension */
@@ -112,6 +114,8 @@ struct saa7146_dev
/* pci-device & irq stuff*/
char name[32];
struct pci_dev *pci;
+ u32 int_todo;
+ spinlock_t int_slock;
/* extension handling */
struct saa7146_extension *ext; /* indicates if handled by extension */
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 1b4ca2222..432fa4f4e 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -233,15 +233,16 @@ void try_attach_extension_and_device(struct saa7146_dev *dev, struct saa7146_ext
DEB_S(("ext->preinit() failed for %p. skipping.\n",dev));
return;
}
-
- if( 0 != ext->probe(dev, dev->pci->subsystem_vendor, dev->pci->subsystem_device) ) {
- DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
- return;
+
+ if( 0 != ext->probe) {
+ if( 0 != ext->probe(dev, dev->pci->subsystem_vendor, dev->pci->subsystem_device) ) {
+ DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
+ return;
+ }
}
dev->ext = ext;
-
- if( 0 != ext->attach(dev) ) {
+ if( 0 != ext->attach(dev, &ext->devices[i]) ) {
DEB_D(("ext->attach() failed for %p. skipping device.\n",dev));
dev->ext = NULL;
return;
@@ -447,6 +448,7 @@ static int config_a_device(struct pci_dev *pci)
pci_set_drvdata(pci,dev);
init_MUTEX(&dev->lock);
+ dev->int_slock = SPIN_LOCK_UNLOCKED;
dev->slock = SPIN_LOCK_UNLOCKED;
init_MUTEX(&dev->i2c_lock);