Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1310ff4 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 7a541ce0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -576,6 +576,10 @@ static int af9035_download_firmware(struct dvb_usb_device *d,
			goto err;

		if (state->chip_type == 0x9135) {
			if (!tmp)
				/* default 0x9135 slave I2C address */
				tmp = 0x3a;

			ret = af9035_wr_reg(d, 0x004bfb, tmp);
			if (ret < 0)
				goto err;
@@ -684,6 +688,10 @@ static int af9035_read_config(struct dvb_usb_device *d)
		if (ret < 0)
			goto err;

		if (!tmp && state->chip_type == 0x9135)
			/* default 0x9135 slave I2C address */
			tmp = 0x3a;

		state->af9033_config[1].i2c_addr = tmp;
		dev_dbg(&d->udev->dev, "%s: 2nd demod I2C addr=%02x\n",
				__func__, tmp);