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

Commit d1190024 authored by Olivier Grenie's avatar Olivier Grenie Committed by Mauro Carvalho Chehab
Browse files

[media] dib9090: limit the I2C speed



The intend of this patch is to limit the maximum I2C speed.

Signed-off-by: default avatarOlivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: default avatarPatrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 88f3a358
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2138,7 +2138,7 @@ static int dib9090_tuner_attach(struct dvb_usb_adapter *adap)
	i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0);
	if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0)
		return -ENODEV;
	dib0700_set_i2c_speed(adap->dev, 2000);
	dib0700_set_i2c_speed(adap->dev, 1500);
	if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0)
		return -ENODEV;
	release_firmware(state->frontend_firmware);
@@ -2217,7 +2217,8 @@ static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap)
	i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0);
	if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0)
		return -ENODEV;
	dib0700_set_i2c_speed(adap->dev, 2000);

	dib0700_set_i2c_speed(adap->dev, 1500);
	if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0)
		return -ENODEV;

@@ -2230,7 +2231,7 @@ static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap)
		if (dvb_attach(dib0090_fw_register, fe_slave, i2c, &nim9090md_dib0090_config[1]) == NULL)
			return -ENODEV;
		fe_slave->dvb = adap->fe_adap[0].fe->dvb;
		dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 2000);
		dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500);
		if (dib9000_firmware_post_pll_init(fe_slave) < 0)
			return -ENODEV;
	}