summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/cx24110.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends/cx24110.c')
-rw-r--r--linux/drivers/media/dvb/frontends/cx24110.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c
index ed2441cdd..87d26398b 100644
--- a/linux/drivers/media/dvb/frontends/cx24110.c
+++ b/linux/drivers/media/dvb/frontends/cx24110.c
@@ -467,6 +467,17 @@ int cx24110_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
};
}
+static void sendDiSEqCMessage(struct dvb_i2c_bus *i2c, struct dvb_diseqc_master_cmd *pCmd) {
+ int i, rv;
+ for (i = 0; i < pCmd->msg_len; i++)
+ cx24110_writereg(i2c, 0x79 + i, pCmd->msg[i]);
+
+ rv = cx24110_readreg(i2c, 0x76);
+
+ cx24110_writereg(i2c, 0x76, ((rv & 0x90) | 0x40) | ((pCmd->msg_len-3) & 3));
+ for(i=500;i-->0&&!(cx24110_readreg(i2c,0x76)&0x40);); /* wait for LNB ready */
+}
+
static
int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
@@ -617,6 +628,12 @@ int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
case FE_SET_VOLTAGE:
return cx24110_set_voltage (i2c, (fe_sec_voltage_t) arg);
+ case FE_DISEQC_SEND_MASTER_CMD:
+ {
+ sendDiSEqCMessage(i2c, (struct dvb_diseqc_master_cmd*) arg);
+ return 0;
+ }
+
default:
return -EOPNOTSUPP;
};