summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-gpio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-04 12:27:24 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-08-04 12:27:24 +0200
commite2c1209e77562d528530701fcaa062c687f1da49 (patch)
tree3f323323ae19746f8cddda216ea826acf70a7b44 /linux/drivers/media/video/ivtv/ivtv-gpio.c
parent67d69df98ea9a3e3190979018295694ced18e204 (diff)
downloadmediapointer-dvb-s2-e2c1209e77562d528530701fcaa062c687f1da49.tar.gz
mediapointer-dvb-s2-e2c1209e77562d528530701fcaa062c687f1da49.tar.bz2
ivtv: add AverMedia M116, prepare for userspace Xceive tuner
From: Hans Verkuil <hverkuil@xs4all.nl> - 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 <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-gpio.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-gpio.c12
1 files changed, 5 insertions, 7 deletions
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