Skip to content

Commit

Permalink
V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs
Browse files Browse the repository at this point in the history
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: Andrew de Quincey <adq_dvb@lidskialf.net>

Signed-off-by: Saqeb Akhter <johoja@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Saqeb Akhter authored and Mauro Carvalho Chehab committed Jun 30, 2006
1 parent 70d9063 commit ccd214b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/frontends/cx24123.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage
switch (voltage) {
case SEC_VOLTAGE_13:
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:
dprintk("%s: setting voltage 18V\n", __FUNCTION__);
return cx24123_writereg(state, 0x29, val & 0x7f);
return cx24123_writereg(state, 0x29, val | 0x80);
default:
return -EINVAL;
};
Expand Down

0 comments on commit ccd214b

Please sign in to comment.