Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92660
b: refs/heads/master
c: 11d3f32
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Schwarzott authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent caf0647 commit c260691
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a5cbd591c703491b62892682adc124ece67f3a9
refs/heads/master: 11d3f323930ef625c1018ed13adeb04127c356e0
7 changes: 6 additions & 1 deletion trunk/drivers/media/dvb/frontends/mt312.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/dvb/frontends/mt312.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c260691

Please sign in to comment.