From e2c1209e77562d528530701fcaa062c687f1da49 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 4 Aug 2007 12:27:24 +0200 Subject: ivtv: add AverMedia M116, prepare for userspace Xceive tuner From: Hans Verkuil - Split Club3D card from Yuan PG600-2, GotView PCI DVD Lite (different composite input) - Add AVerTV MCE 116 Plus (M116) card - Allow Xceive cards to be used without Xceive support - Update Xceive support to latest userspace tuner (still not on by default, pending inclusion of userspace tuner in the kernel). - Use CONFIG_XC3028 rather than HAVE_XC3028: gentree.pl will remove them automatically. Thanks to Markus Rechberger for help with the userspace tuner support. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/ivtv/ivtv-gpio.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'linux/drivers/media/video/ivtv/ivtv-gpio.c') diff --git a/linux/drivers/media/video/ivtv/ivtv-gpio.c b/linux/drivers/media/video/ivtv/ivtv-gpio.c index 6a5a7aa66..09b43b41f 100644 --- a/linux/drivers/media/video/ivtv/ivtv-gpio.c +++ b/linux/drivers/media/video/ivtv/ivtv-gpio.c @@ -122,15 +122,14 @@ void ivtv_reset_ir_gpio(struct ivtv *itv) write_reg(curdir, IVTV_REG_GPIO_DIR); } -#ifdef HAVE_XC3028 -int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr) +#ifdef CONFIG_XC3028 +/* Xceive tuner reset function */ +int ivtv_reset_tuner_gpio(void *dev, int cmd, int value) { + struct ivtv *itv = (struct ivtv *)dev; int curdir, curout; - struct ivtv *itv = (struct ivtv *) priv; - if (itv->card->type != IVTV_CARD_PG600V2 || itv->options.tuner != TUNER_XCEIVE_XC3028) - return -EINVAL; - IVTV_INFO("Resetting tuner\n"); + IVTV_DEBUG_INFO("Resetting tuner\n"); curout = read_reg(IVTV_REG_GPIO_OUT); curdir = read_reg(IVTV_REG_GPIO_DIR); curdir |= (1 << 12); /* GPIO bit 12 */ @@ -142,7 +141,6 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr) curout |= (1 << 12); write_reg(curout, IVTV_REG_GPIO_OUT); schedule_timeout_interruptible(msecs_to_jiffies(1)); - return 0; } #endif -- cgit v1.2.3