diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2008-04-12 22:04:50 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 21:09:40 +0400 |
commit | 11d3f323930ef625c1018ed13adeb04127c356e0 (patch) | |
tree | e361482488c108ba7c48f922a1d7e465ada003cb /drivers/media/dvb/frontends | |
parent | 6a5cbd591c703491b62892682adc124ece67f3a9 (diff) | |
download | linux-11d3f323930ef625c1018ed13adeb04127c356e0.tar.xz |
V4L/DVB (7575): mt312: add attach-time setting to invert lnb-voltage
Add a setting to config struct for inversion of lnb-voltage.
Needed for support of Avermedia A700 cards.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/mt312.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/mt312.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c index e17a36180f9c..081ca3398c76 100644 --- a/drivers/media/dvb/frontends/mt312.c +++ b/drivers/media/dvb/frontends/mt312.c @@ -422,11 +422,16 @@ static int mt312_set_voltage(struct dvb_frontend *fe, const fe_sec_voltage_t v) { struct mt312_state *state = fe->demodulator_priv; const u8 volt_tab[3] = { 0x00, 0x40, 0x00 }; + u8 val; if (v > SEC_VOLTAGE_OFF) return -EINVAL; - return mt312_writereg(state, DISEQC_MODE, volt_tab[v]); + val = volt_tab[v]; + if (state->config->voltage_inverted) + val ^= 0x40; + + return mt312_writereg(state, DISEQC_MODE, val); } static int mt312_read_status(struct dvb_frontend *fe, fe_status_t *s) diff --git a/drivers/media/dvb/frontends/mt312.h b/drivers/media/dvb/frontends/mt312.h index afe24fd822bd..96338f0c4dd4 100644 --- a/drivers/media/dvb/frontends/mt312.h +++ b/drivers/media/dvb/frontends/mt312.h @@ -31,6 +31,9 @@ struct mt312_config { /* the demodulator's i2c address */ u8 demod_address; + + /* inverted voltage setting */ + int voltage_inverted:1; }; #if defined(CONFIG_DVB_MT312) || (defined(CONFIG_DVB_MT312_MODULE) && defined(MODULE)) |