V4L/DVB (3389): Fix broken IF-OUT Relay handling
authorManu Abraham <manu@linuxtv.org>
Mon, 27 Feb 2006 03:09:29 +0000 (00:09 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 27 Feb 2006 03:09:29 +0000 (00:09 -0300)
Fixed broken IF-OUT on pinnacle sat board.
Thanks to Edgar Toernig

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/dvb/frontends/cx24110.c
drivers/media/dvb/frontends/cx24110.h

index 1649846f9ceb1c7c957cf6cf3440ba2756798ca1..f5bfcd2b3803f5746e666d1aa3f7bb5a1c36d156 100644 (file)
@@ -239,6 +239,20 @@ static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_paramete
 
 static int pinnsat_pll_init(struct dvb_frontend* fe)
 {
+       struct dvb_bt8xx_card *card = fe->dvb->priv;
+
+       bttv_gpio_enable(card->bttv_nr, 1, 1);  /* output */
+       bttv_write_gpio(card->bttv_nr, 1, 1);   /* relay on */
+       
+       return 0;
+}
+
+static int pinnsat_pll_sleep(struct dvb_frontend* fe)
+{
+       struct dvb_bt8xx_card *card = fe->dvb->priv;
+
+       bttv_write_gpio(card->bttv_nr, 1, 0);   /* relay off */
+
        return 0;
 }
 
@@ -246,6 +260,7 @@ static struct cx24110_config pctvsat_config = {
        .demod_address = 0x55,
        .pll_init = pinnsat_pll_init,
        .pll_set = cx24108_pll_set,
+       .pll_sleep = pinnsat_pll_sleep,
 };
 
 static int microtune_mt7202dtf_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
index cc68b7e83b5e30e9a6f2aad28c4085a72a34d166..f3edf8b517dd274c0e0bd9cfdc2405d175c72355 100644 (file)
@@ -371,6 +371,15 @@ static int cx24110_initfe(struct dvb_frontend* fe)
        return 0;
 }
 
+static int cx24110_sleep(struct dvb_frontend *fe)
+{
+       struct cx24110_state *state = fe->demodulator_priv;
+
+       if (state->config->pll_sleep)
+                 return state->config->pll_sleep(fe);
+       return 0;
+}
+
 static int cx24110_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage)
 {
        struct cx24110_state *state = fe->demodulator_priv;
@@ -642,6 +651,7 @@ static struct dvb_frontend_ops cx24110_ops = {
        .release = cx24110_release,
 
        .init = cx24110_initfe,
+       .sleep = cx24110_sleep,
        .set_frontend = cx24110_set_frontend,
        .get_frontend = cx24110_get_frontend,
        .read_status = cx24110_read_status,
index b63ecf26421a08003ca7fced3ce278e6be5ff98b..609ac642b406ad748c791cfd441b825460cb9080 100644 (file)
@@ -35,6 +35,7 @@ struct cx24110_config
        /* PLL maintenance */
        int (*pll_init)(struct dvb_frontend* fe);
        int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
+       int (*pll_sleep)(struct dvb_frontend* fe);
 };
 
 extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
This page took 0.026623 seconds and 5 git commands to generate.