/*
+ $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.
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 <linux/module.h>
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;
}
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;
}
if (card >= bttv_num) {
return -EINVAL;
}
-
+
btv = &bttvs[card];
gpio_inout(mask,data);
if (bttv_gpio)
int bttv_read_gpio(unsigned int card, unsigned long *data)
{
struct bttv *btv;
-
+
if (card >= bttv_num) {
return -EINVAL;
}
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;
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)
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