From: Michael Krufky Date: Sun, 16 Dec 2012 16:24:59 +0000 (-0300) Subject: [media] tda10071: add tuner_i2c_addr to struct tda10071_config X-Git-Tag: upstream/snapshot3+hdmi~4891^2~630 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0176fd4d25d684ea38014b8e2c3221790d5c94d8;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Reviewed-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index 16a4bc5..7103629 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) 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; diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h index 21163c4..a20d5c4 100644 --- a/drivers/media/dvb-frontends/tda10071.h +++ b/drivers/media/dvb-frontends/tda10071.h @@ -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