[media] tda10071: add tuner_i2c_addr to struct tda10071_config
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 16 Dec 2012 16:24:59 +0000 (13:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 Dec 2012 19:04:55 +0000 (17:04 -0200)
The default i2c address for the tuner is 0x14,
allow this to be overridden with a configuration parameter

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-frontends/tda10071.c
drivers/media/dvb-frontends/tda10071.h

index 16a4bc54dbe79acefc0c63789c05c6f21d0d977b..710362916f83c4f5f67f96496f809c415c65abb0 100644 (file)
@@ -1064,7 +1064,7 @@ static int tda10071_init(struct dvb_frontend *fe)
                cmd.args[2] = 0x00;
                cmd.args[3] = 0x00;
                cmd.args[4] = 0x00;
-               cmd.args[5] = 0x14;
+               cmd.args[5] = (priv->cfg.tuner_i2c_addr) ? priv->cfg.tuner_i2c_addr : 0x14;
                cmd.args[6] = 0x00;
                cmd.args[7] = 0x03;
                cmd.args[8] = 0x02;
index 21163c4b555c9f76b32958d00d1593ba554281f1..a20d5c41e0481fe16b6be6782ca50dc80c6d5c52 100644 (file)
@@ -30,6 +30,12 @@ struct tda10071_config {
         */
        u8 i2c_address;
 
+       /* Tuner I2C address.
+        * Default: 0x14
+        * Values: 0x14, 0x54, ...
+        */
+       u8 tuner_i2c_addr;
+
        /* Max bytes I2C provider can write at once.
         * Note: Buffer is taken from the stack currently!
         * Default: none, must set