This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] em28xx: PCTV tripleStick (292e) LNA support
Author:  Antti Palosaari <[email protected]>
Date:    Tue Apr 22 22:56:54 2014 -0300

External LNA between antenna connector and RF tuner is controlled
by EM28178 GPIO 0. GPIO value 1 is LNA active and value 0 is LNA
disabled.

Signed-off-by: Antti Palosaari <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/usb/em28xx/em28xx-dvb.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=ffb9948e65e785a8660b7f1e49022cc6505e709e

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c 
b/drivers/media/usb/em28xx/em28xx-dvb.c
index b79e08b..a121ed9 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -746,6 +746,21 @@ static int em28xx_pctv_290e_set_lna(struct dvb_frontend 
*fe)
 #endif
 }
 
+static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe)
+{
+       struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+       struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
+       struct em28xx *dev = i2c_bus->dev;
+       u8 lna;
+
+       if (c->lna == 1)
+               lna = 0x01;
+       else
+               lna = 0x00;
+
+       return em28xx_write_reg_bits(dev, EM2874_R80_GPIO_P0_CTRL, lna, 0x01);
+}
+
 static int em28xx_mt352_terratec_xs_init(struct dvb_frontend *fe)
 {
        /* Values extracted from a USB trace of the Terratec Windows driver */
@@ -1553,6 +1568,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
                        }
 
                        dvb->i2c_client_tuner = client;
+                       dvb->fe[0]->ops.set_lna = em28xx_pctv_292e_set_lna;
                }
                break;
        default:

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to