X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fbttv-if.c;h=f7b5543a96a1bf760df9ff1c96f01fba8d4a7968;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=74da71195ba811d9b1abecdf0628509d99c78f88;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/media/video/bttv-if.c b/drivers/media/video/bttv-if.c index 74da71195..f7b5543a9 100644 --- a/drivers/media/video/bttv-if.c +++ b/drivers/media/video/bttv-if.c @@ -1,4 +1,6 @@ /* + $Id: bttv-if.c,v 1.4 2004/11/17 18:47:47 kraxel Exp $ + bttv-if.c -- old gpio interface to other kernel modules don't use in new code, will go away in 2.7 have a look at bttv-gpio.c instead. @@ -22,7 +24,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - + */ #include @@ -48,6 +50,8 @@ EXPORT_SYMBOL(bttv_i2c_call); int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid) { + printk("The bttv_* interface is obsolete and will go away,\n" + "please use the new, sysfs based interface instead.\n"); if (card >= bttv_num) { return -1; } @@ -65,7 +69,8 @@ struct pci_dev* bttv_get_pcidev(unsigned int card) int bttv_get_id(unsigned int card) { - printk("bttv_get_id is obsolete, use bttv_get_cardinfo instead\n"); + printk("The bttv_* interface is obsolete and will go away,\n" + "please use the new, sysfs based interface instead.\n"); if (card >= bttv_num) { return -1; } @@ -80,7 +85,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data) if (card >= bttv_num) { return -EINVAL; } - + btv = &bttvs[card]; gpio_inout(mask,data); if (bttv_gpio) @@ -91,7 +96,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data) int bttv_read_gpio(unsigned int card, unsigned long *data) { struct bttv *btv; - + if (card >= bttv_num) { return -EINVAL; } @@ -102,7 +107,7 @@ int bttv_read_gpio(unsigned int card, unsigned long *data) return -ENODEV; } -/* prior setting BT848_GPIO_REG_INP is (probably) not needed +/* prior setting BT848_GPIO_REG_INP is (probably) not needed because we set direct input on init */ *data = gpio_read(); return 0; @@ -111,14 +116,14 @@ int bttv_read_gpio(unsigned int card, unsigned long *data) int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data) { struct bttv *btv; - + if (card >= bttv_num) { return -EINVAL; } btv = &bttvs[card]; -/* prior setting BT848_GPIO_REG_INP is (probably) not needed +/* prior setting BT848_GPIO_REG_INP is (probably) not needed because direct input is set on init */ gpio_bits(mask,data); if (bttv_gpio) @@ -141,6 +146,13 @@ wait_queue_head_t* bttv_get_gpio_queue(unsigned int card) return &btv->gpioq; } +void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg) +{ + if (card >= bttv_num) + return; + bttv_call_i2c_clients(&bttvs[card], cmd, arg); +} + /* * Local variables: * c-basic-offset: 8