[media] dib9090: limit the I2C speed
authorOlivier Grenie <olivier.grenie@dibcom.fr>
Mon, 29 Aug 2011 13:58:47 +0000 (10:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 22:56:07 +0000 (20:56 -0200)
The intend of this patch is to limit the maximum I2C speed.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dib0700_devices.c

index 823c3562b84e59fbde2223251f6cf44f849ab3cd..d0174fd9a087f7315812865c3a73286639c1dd26 100644 (file)
@@ -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;
        }