aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/af9035.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-02-09 08:02:49 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-24 08:41:05 -0500
commita1310ff4c438bbdbd76dda5cbc27cc108d08d1c1 (patch)
tree17c7cf11b5c8c3ff69c0dcc3ba7759459c58b981 /drivers/media/usb/dvb-usb-v2/af9035.c
parent7a541ce08ce25e2037bdc1ff2c22fbf790072466 (diff)
[media] af9035: add default 0x9135 slave I2C address
On some devices the vendor has not set EEPROM_2ND_DEMOD_ADDR. Checks tmp is not zero after call to get EEPROM_2ND_DEMOD_ADDR and sets the default slave address of 0x3a on 0x9135 devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/af9035.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 3825c2f2f99e..4f682ad97bc2 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -576,6 +576,10 @@ static int af9035_download_firmware(struct dvb_usb_device *d,
576 goto err; 576 goto err;
577 577
578 if (state->chip_type == 0x9135) { 578 if (state->chip_type == 0x9135) {
579 if (!tmp)
580 /* default 0x9135 slave I2C address */
581 tmp = 0x3a;
582
579 ret = af9035_wr_reg(d, 0x004bfb, tmp); 583 ret = af9035_wr_reg(d, 0x004bfb, tmp);
580 if (ret < 0) 584 if (ret < 0)
581 goto err; 585 goto err;
@@ -684,6 +688,10 @@ static int af9035_read_config(struct dvb_usb_device *d)
684 if (ret < 0) 688 if (ret < 0)
685 goto err; 689 goto err;
686 690
691 if (!tmp && state->chip_type == 0x9135)
692 /* default 0x9135 slave I2C address */
693 tmp = 0x3a;
694
687 state->af9033_config[1].i2c_addr = tmp; 695 state->af9033_config[1].i2c_addr = tmp;
688 dev_dbg(&d->udev->dev, "%s: 2nd demod I2C addr=%02x\n", 696 dev_dbg(&d->udev->dev, "%s: 2nd demod I2C addr=%02x\n",
689 __func__, tmp); 697 __func__, tmp);