summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/stb0899_drv.c
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2007-10-05 18:41:19 +0400
committerManu Abraham <manu@linuxtv.org>2007-10-05 18:41:19 +0400
commit1b6803c5c59820db0f49b9461d991f91ce789e85 (patch)
tree7301e534c4843c1c8ba7febcd0b078d6acaf9215 /linux/drivers/media/dvb/frontends/stb0899_drv.c
parent2eb656e25d91845553a215568bd53a36d4ad6064 (diff)
downloadmediapointer-dvb-s2-1b6803c5c59820db0f49b9461d991f91ce789e85.tar.gz
mediapointer-dvb-s2-1b6803c5c59820db0f49b9461d991f91ce789e85.tar.bz2
Initialize DiSEqC
From: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stb0899_drv.c')
-rw-r--r--linux/drivers/media/dvb/frontends/stb0899_drv.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb0899_drv.c b/linux/drivers/media/dvb/frontends/stb0899_drv.c
index 7f575b5fc..4fe20afeb 100644
--- a/linux/drivers/media/dvb/frontends/stb0899_drv.c
+++ b/linux/drivers/media/dvb/frontends/stb0899_drv.c
@@ -796,7 +796,6 @@ static int stb0899_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t
return 0;
}
-#if 0
static int stb0899_diseqc_init(struct stb0899_state *state)
{
struct dvb_diseqc_master_cmd tx_data;
@@ -812,17 +811,18 @@ static int stb0899_diseqc_init(struct stb0899_state *state)
tx_data.msg[0] = 0xe2;
tx_data.msg_len = 3;
- /* disable Tx spy */
reg = stb0899_read_reg(state, STB0899_DISCNTRL2);
STB0899_SETFIELD_VAL(ONECHIP_TRX, reg, 0);
stb0899_write_reg(state, STB0899_DISCNTRL2, reg);
- reg = stb0899_read_reg(state, STB0899_DISCNTRL2);
- STB0899_SETFIELD_VAL(ONECHIP_TRX, reg, 1);
- stb0899_write_reg(state, STB0899_DISCNTRL2, reg);
- reg = stb0899_read_reg(state, STB0899_DISCNTRL2);
- STB0899_SETFIELD_VAL(ONECHIP_TRX, reg, 0);
- stb0899_write_reg(state, STB0899_DISCNTRL2, reg);
+ /* disable Tx spy */
+ reg = stb0899_read_reg(state, STB0899_DISCNTRL1);
+ STB0899_SETFIELD_VAL(DISEQCRESET, reg, 1);
+ stb0899_write_reg(state, STB0899_DISCNTRL1, reg);
+
+ reg = stb0899_read_reg(state, STB0899_DISCNTRL1);
+ STB0899_SETFIELD_VAL(DISEQCRESET, reg, 0);
+ stb0899_write_reg(state, STB0899_DISCNTRL1, reg);
mclk = stb0899_get_mclk(state);
f22_tx = mclk / (tx_freq * 32);
@@ -830,6 +830,7 @@ static int stb0899_diseqc_init(struct stb0899_state *state)
state->rx_freq = 20000;
f22_rx = mclk / (state->rx_freq * 32);
+#if 0
while ((count < 5) && (trial < 2)) {
stb0899_write_reg(state, STB0899_DISF22, f22_tx); /* 2 possible values 17.5k/20k */
@@ -864,9 +865,9 @@ static int stb0899_diseqc_init(struct stb0899_state *state)
if ((ret_1 == 0) && (ret_2 == 0))
state->rx_freq = 0; /* no DiSEqC 2.0 slave */
+#endif
return 0;
}
-#endif
static int stb0899_sleep(struct dvb_frontend *fe)
{
@@ -939,7 +940,7 @@ static int stb0899_init(struct dvb_frontend *fe)
stb0899_write_reg(state, config->init_tst[i].address, config->init_tst[i].data);
stb0899_init_calc(state);
-// stb0899_diseqc_init(state);
+ stb0899_diseqc_init(state);
return 0;
}