diff options
author | Igor M. Liplianin <liplianin@me.by> | 2012-05-08 04:25:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-20 12:13:32 -0300 |
commit | 38431a98a183b37b4512225d1a95336d82efbf9b (patch) | |
tree | f2bbf2c9c7f0ed68a495da35d611b75c443b0cdf /drivers | |
parent | 6ae009a8ba512d5b07386bbb1172cfd7a02986aa (diff) | |
download | op-kernel-dev-38431a98a183b37b4512225d1a95336d82efbf9b.zip op-kernel-dev-38431a98a183b37b4512225d1a95336d82efbf9b.tar.gz |
[media] m88rs2000: LNB voltage control implemented
Trival patch to get it working with my cards stuff.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/m88rs2000.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/m88rs2000.c b/drivers/media/dvb/frontends/m88rs2000.c index 82cc145..0ad5bd8 100644 --- a/drivers/media/dvb/frontends/m88rs2000.c +++ b/drivers/media/dvb/frontends/m88rs2000.c @@ -416,9 +416,25 @@ static int m88rs2000_tab_set(struct m88rs2000_state *state, static int m88rs2000_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t volt) { - deb_info("%s: %s\n", __func__, - volt == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" : - volt == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??"); + struct m88rs2000_state *state = fe->demodulator_priv; + u8 data; + + data = m88rs2000_demod_read(state, 0xb2); + data |= 0x03; /* bit0 V/H, bit1 off/on */ + + switch (volt) { + case SEC_VOLTAGE_18: + data &= ~0x03; + break; + case SEC_VOLTAGE_13: + data &= ~0x03; + data |= 0x01; + break; + case SEC_VOLTAGE_OFF: + break; + } + + m88rs2000_demod_write(state, 0xb2, data); return 0; } |