diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2012-12-16 11:24:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-18 14:04:55 -0500 |
commit | 0176fd4d25d684ea38014b8e2c3221790d5c94d8 (patch) | |
tree | c7726184e89bb640d0218b7a5fa769bbce82243b | |
parent | 5b7d8de7d2328f7b25fe4645eafee7e48f9b7df3 (diff) |
[media] tda10071: add tuner_i2c_addr to struct tda10071_config
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>
-rw-r--r-- | drivers/media/dvb-frontends/tda10071.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb-frontends/tda10071.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index 16a4bc54dbe7..710362916f83 100644 --- a/drivers/media/dvb-frontends/tda10071.c +++ b/drivers/media/dvb-frontends/tda10071.c | |||
@@ -1064,7 +1064,7 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
1064 | cmd.args[2] = 0x00; | 1064 | cmd.args[2] = 0x00; |
1065 | cmd.args[3] = 0x00; | 1065 | cmd.args[3] = 0x00; |
1066 | cmd.args[4] = 0x00; | 1066 | cmd.args[4] = 0x00; |
1067 | cmd.args[5] = 0x14; | 1067 | cmd.args[5] = (priv->cfg.tuner_i2c_addr) ? priv->cfg.tuner_i2c_addr : 0x14; |
1068 | cmd.args[6] = 0x00; | 1068 | cmd.args[6] = 0x00; |
1069 | cmd.args[7] = 0x03; | 1069 | cmd.args[7] = 0x03; |
1070 | cmd.args[8] = 0x02; | 1070 | cmd.args[8] = 0x02; |
diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h index 21163c4b555c..a20d5c41e048 100644 --- a/drivers/media/dvb-frontends/tda10071.h +++ b/drivers/media/dvb-frontends/tda10071.h | |||
@@ -30,6 +30,12 @@ struct tda10071_config { | |||
30 | */ | 30 | */ |
31 | u8 i2c_address; | 31 | u8 i2c_address; |
32 | 32 | ||
33 | /* Tuner I2C address. | ||
34 | * Default: 0x14 | ||
35 | * Values: 0x14, 0x54, ... | ||
36 | */ | ||
37 | u8 tuner_i2c_addr; | ||
38 | |||
33 | /* Max bytes I2C provider can write at once. | 39 | /* Max bytes I2C provider can write at once. |
34 | * Note: Buffer is taken from the stack currently! | 40 | * Note: Buffer is taken from the stack currently! |
35 | * Default: none, must set | 41 | * Default: none, must set |