summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-gpio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-12-22 01:33:36 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2007-12-22 01:33:36 +0100
commit9542e383f613070c986fbdfee8d8dc582e99f75f (patch)
treebe6344747b39b1b8c2d3424ed3e41151ac57d2ef /linux/drivers/media/video/ivtv/ivtv-gpio.c
parent0845ae16e220be09645b258217b87a1640f80f75 (diff)
downloadmediapointer-dvb-s2-9542e383f613070c986fbdfee8d8dc582e99f75f.tar.gz
mediapointer-dvb-s2-9542e383f613070c986fbdfee8d8dc582e99f75f.tar.bz2
ivtv: add XC2028 support for Club3D cards
From: Hans Verkuil <hverkuil@xs4all.nl> 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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-gpio.c b/linux/drivers/media/video/ivtv/ivtv-gpio.c
index 14f57285d..688cd3856 100644
--- a/linux/drivers/media/video/ivtv/ivtv-gpio.c
+++ b/linux/drivers/media/video/ivtv/ivtv-gpio.c
@@ -22,6 +22,7 @@
#include "ivtv-driver.h"
#include "ivtv-cards.h"
#include "ivtv-gpio.h"
+#include "tuner-xc2028.h"
#include <media/tuner.h>
/*
@@ -122,13 +123,15 @@ void ivtv_reset_ir_gpio(struct ivtv *itv)
write_reg(curdir, IVTV_REG_GPIO_DIR);
}
-#ifdef HAVE_XC2028
/* Xceive tuner reset function */
int ivtv_reset_tuner_gpio(void *dev, int cmd, int value)
{
- struct ivtv *itv = (struct ivtv *)dev;
+ struct i2c_algo_bit_data *algo = dev;
+ struct ivtv *itv = algo->data;
int curdir, curout;
+ if (cmd != XC2028_TUNER_RESET)
+ return 0;
IVTV_DEBUG_INFO("Resetting tuner\n");
curout = read_reg(IVTV_REG_GPIO_OUT);
curdir = read_reg(IVTV_REG_GPIO_DIR);
@@ -143,7 +146,6 @@ int ivtv_reset_tuner_gpio(void *dev, int cmd, int value)
schedule_timeout_interruptible(msecs_to_jiffies(1));
return 0;
}
-#endif
void ivtv_gpio_init(struct ivtv *itv)
{