Srinivas Pandruvada schrieb am 18.11.2014 um 18:53: > This chip has a mode in which this chipset can be i2c master. But > the current upstream driver doesn't support such mode as there is > some limited support of clients, which can be connected. > > To attach such clients to main i2c bus chip has to be set up in > bypass mode. Creates an i2c mux, which will enable/disable this mode. > This was discussed for a while in mailing list, this was the decision. > > This change also provides an API, which allows clients to be created for > this mux adapter. > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> > --- <...> > @@ -720,6 +871,10 @@ static int inv_mpu_probe(struct i2c_client *client, > goto out_remove_trigger; > } > > + result = inv_mpu6050_create_mux(indio_dev); > + if (result) > + goto out_remove_trigger; At this point, iio_device_register(indio_dev) has successfully been called, so I think you should add an extra label and the entry iio_device_unregister(indio_dev) to the error path. > + > return 0; > > out_remove_trigger: > @@ -734,6 +889,7 @@ static int inv_mpu_remove(struct i2c_client *client) > struct iio_dev *indio_dev = i2c_get_clientdata(client); > struct inv_mpu6050_state *st = iio_priv(indio_dev); > > + inv_mpu6050_destroy_mux(indio_dev); > iio_device_unregister(indio_dev); > inv_mpu6050_remove_trigger(st); > iio_triggered_buffer_cleanup(indio_dev); -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html