summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorAndreas Oberritter <devnull@localhost>2003-06-24 00:30:44 +0000
committerAndreas Oberritter <devnull@localhost>2003-06-24 00:30:44 +0000
commit9d17b86119fc38f8600e5a4dadf6ade4d09dfe03 (patch)
tree6112d7123001b846da56c95dd36d77110b51cbe2 /linux/drivers/media/dvb
parent110ae9ae8a3affd6ea21c736a367eb6d838a1bc7 (diff)
downloadmediapointer-dvb-s2-9d17b86119fc38f8600e5a4dadf6ade4d09dfe03.tar.gz
mediapointer-dvb-s2-9d17b86119fc38f8600e5a4dadf6ade4d09dfe03.tar.bz2
support for Mitel VP310 (untested)
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/frontends/mt312.c13
-rw-r--r--linux/drivers/media/dvb/frontends/mt312.h5
2 files changed, 13 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/mt312.c b/linux/drivers/media/dvb/frontends/mt312.c
index 9f9b6736e..9ea6c2ccd 100644
--- a/linux/drivers/media/dvb/frontends/mt312.c
+++ b/linux/drivers/media/dvb/frontends/mt312.c
@@ -149,8 +149,8 @@ int mt312_pll_write(struct dvb_i2c_bus *i2c, const u8 addr, u8 *buf, const u8 le
msg.addr = addr;
msg.flags = 0;
- msg.buf = buf;
- msg.len = len;
+ msg.buf = buf;
+ msg.len = len;
if ((ret = mt312_writereg(i2c, GPP_CTRL, 0x40)) < 0)
return ret;
@@ -613,7 +613,10 @@ int mt312_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
return mt312_send_master_cmd(i2c, arg);
case FE_DISEQC_RECV_SLAVE_REPLY:
- return mt312_recv_slave_reply(i2c, arg);
+ if ((long)fe->data == ID_MT312)
+ return mt312_recv_slave_reply(i2c, arg);
+ else
+ return -EOPNOTSUPP;
case FE_DISEQC_SEND_BURST:
return mt312_send_burst(i2c, (fe_sec_mini_cmd_t) arg);
@@ -676,10 +679,10 @@ int mt312_attach(struct dvb_i2c_bus *i2c)
if ((ret = mt312_readreg(i2c, ID, &id)) < 0)
return ret;
- if (id != 0x03)
+ if ((id != ID_VP310) && (id != ID_MT312))
return -ENODEV;
- return dvb_register_frontend(mt312_ioctl, i2c, NULL, &mt312_info);
+ return dvb_register_frontend(mt312_ioctl, i2c, (void *)(long)id, &mt312_info);
}
static
diff --git a/linux/drivers/media/dvb/frontends/mt312.h b/linux/drivers/media/dvb/frontends/mt312.h
index d39bcecd3..46e8c501d 100644
--- a/linux/drivers/media/dvb/frontends/mt312.h
+++ b/linux/drivers/media/dvb/frontends/mt312.h
@@ -154,4 +154,9 @@ typedef enum mt312_reg_addr {
CONFIG = 127
} mt312_reg_addr_t;
+enum mt312_model_id {
+ ID_VP310 = 1,
+ ID_MT312 = 3
+};
+
#endif /* DVB_FRONTENDS_MT312 */