cx231xx_i2c_mux_register(dev, 0);
cx231xx_i2c_mux_register(dev, 1);
+ /* scan the real bus segments in the order of physical port numbers */
+ cx231xx_do_i2c_scan(dev, I2C_0);
+ cx231xx_do_i2c_scan(dev, I2C_1_MUX_1);
+ cx231xx_do_i2c_scan(dev, I2C_2);
+ cx231xx_do_i2c_scan(dev, I2C_1_MUX_3);
+
/* init hardware */
/* Note : with out calling set power mode function,
afe can not be set up correctly */
int i, rc;
struct i2c_client client;
+ if (!i2c_scan)
+ return;
+
memset(&client, 0, sizeof(client));
client.adapter = cx231xx_get_i2c_adap(dev, i2c_port);
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
i2c_add_adapter(&bus->i2c_adap);
- if (0 == bus->i2c_rc) {
- if (i2c_scan)
- cx231xx_do_i2c_scan(dev, bus->nr);
- } else
+ if (0 != bus->i2c_rc)
cx231xx_warn("%s: i2c bus %d register FAILED\n",
dev->name, bus->nr);