提交 ccd214b2 编写于 作者: S Saqeb Akhter 提交者: Mauro Carvalho Chehab

V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs

The set_voltage function in cx24123.c was corrected to match how it is
described in the CX24123 specs, producing the correct behaviour for cards
that require it.
Acked-by: NAndrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: NSaqeb Akhter <johoja@gmail.com>
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 70d90635
...@@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage ...@@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage
switch (voltage) { switch (voltage) {
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
dprintk("%s: setting voltage 13V\n", __FUNCTION__); dprintk("%s: setting voltage 13V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val | 0x80); return cx24123_writereg(state, 0x29, val & 0x7f);
case SEC_VOLTAGE_18: case SEC_VOLTAGE_18:
dprintk("%s: setting voltage 18V\n", __FUNCTION__); dprintk("%s: setting voltage 18V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val & 0x7f); return cx24123_writereg(state, 0x29, val | 0x80);
default: default:
return -EINVAL; return -EINVAL;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册