diff options
author | Antti Palosaari <crope@iki.fi> | 2014-08-31 07:03:05 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 23:30:21 +0200 |
commit | ef5211fd59ac28e9728bcf5c02207207fb8a74b5 (patch) | |
tree | 01be434804f57c5eeac6a54996163f143875b73a /drivers/media/dvb-frontends/af9033.c | |
parent | [media] it913x: replace udelay polling with jiffies (diff) | |
download | linux-ef5211fd59ac28e9728bcf5c02207207fb8a74b5.tar.xz linux-ef5211fd59ac28e9728bcf5c02207207fb8a74b5.zip |
[media] af9033: fix firmware version logging
AF9030 and IT9130 series has different memory location for firmware
version. Choose correct location according to chip type.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/af9033.c')
-rw-r--r-- | drivers/media/dvb-frontends/af9033.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 7f22f011f8f5..7d637b92ff25 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c @@ -1061,6 +1061,7 @@ struct dvb_frontend *af9033_attach(const struct af9033_config *config, int ret; struct af9033_state *state; u8 buf[8]; + u32 reg; dev_dbg(&i2c->dev, "%s:\n", __func__); @@ -1081,7 +1082,21 @@ struct dvb_frontend *af9033_attach(const struct af9033_config *config, } /* firmware version */ - ret = af9033_rd_regs(state, 0x0083e9, &buf[0], 4); + switch (state->cfg.tuner) { + case AF9033_TUNER_IT9135_38: + case AF9033_TUNER_IT9135_51: + case AF9033_TUNER_IT9135_52: + case AF9033_TUNER_IT9135_60: + case AF9033_TUNER_IT9135_61: + case AF9033_TUNER_IT9135_62: + reg = 0x004bfc; + break; + default: + reg = 0x0083e9; + break; + } + + ret = af9033_rd_regs(state, reg, &buf[0], 4); if (ret < 0) goto err; |