summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-05-12 20:31:51 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 02:00:21 -0300
commitcd20ca9f194323c74ecccf15a3f5ff6c44effe69 (patch)
tree36e8ad6eab353a34dec9713f9bfbfb7c5060a844 /drivers/media/video/cx88/cx88-dvb.c
parent9a10655ffa20b596fd162b1c96301f3bed752918 (diff)
downloadlinux-next-cd20ca9f194323c74ecccf15a3f5ff6c44effe69.tar.gz
V4L/DVB (4012): Fix cx24123 diseqc
Rework diseqc support to be more in line with the other demod drivers. Fix Nova-S-Plus/Nova-SE2 diseqc. Cleanup API. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index ce225202f327..4d369f8393d9 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -59,6 +59,7 @@
#ifdef HAVE_CX24123
# include "cx24123.h"
#endif
+#include "isl6421.h"
MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
@@ -479,28 +480,30 @@ static int cx24123_set_ts_param(struct dvb_frontend* fe,
return 0;
}
-static void cx24123_enable_lnb_voltage(struct dvb_frontend* fe, int on)
+static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
{
struct cx8802_dev *dev= fe->dvb->priv;
struct cx88_core *core = dev->core;
- if (on)
- cx_write(MO_GP0_IO, 0x000006f9);
- else
+ if (voltage == SEC_VOLTAGE_OFF) {
cx_write(MO_GP0_IO, 0x000006fB);
+ } else {
+ cx_write(MO_GP0_IO, 0x000006f9);
+ }
+
+ if (core->prev_set_voltage)
+ return core->prev_set_voltage(fe, voltage);
+ return 0;
}
static struct cx24123_config hauppauge_novas_config = {
.demod_address = 0x55,
- .use_isl6421 = 1,
.set_ts_params = cx24123_set_ts_param,
};
static struct cx24123_config kworld_dvbs_100_config = {
.demod_address = 0x15,
- .use_isl6421 = 0,
.set_ts_params = cx24123_set_ts_param,
- .enable_lnb_voltage = cx24123_enable_lnb_voltage,
};
#endif
@@ -710,10 +713,17 @@ static int dvb_register(struct cx8802_dev *dev)
case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config,
&dev->core->i2c_adap);
+ if (dev->dvb.frontend) {
+ isl6421_attach(dev->dvb.frontend, &dev->core->i2c_adap, 0x08, 0x00, 0x00);
+ }
break;
case CX88_BOARD_KWORLD_DVBS_100:
dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config,
&dev->core->i2c_adap);
+ if (dev->dvb.frontend) {
+ dev->core->prev_set_voltage = dev->dvb.frontend->ops->set_voltage;
+ dev->dvb.frontend->ops->set_voltage = kworld_dvbs_100_set_voltage;
+ }
break;
#endif
default: