@@ -31,3 +31,12 @@ config INV_MPU6050_SPI
over SPI.
This driver can be built as a module. The module will be called
inv-mpu6050-spi.
+
+config INV_MPU6050_MAGN
+ bool "Invensense 9-axis magnetometer support"
+ depends on INV_MPU6050_IIO
+ help
+ For 9xxx chips add support of 9-axis in the driver using chip
+ i2c master to drive the integrated magnetometer.
+ Beware that this is disabling access to the i2c auxiliary bus!
+ Support only MPU925x.
@@ -121,6 +121,11 @@ static int inv_mpu_probe(struct i2c_client *client,
case INV_ICM20608:
case INV_ICM20602:
/* no i2c auxiliary bus on the chip */
+#ifdef CONFIG_INV_MPU6050_MAGN
+ case INV_MPU9250:
+ case INV_MPU9255:
+ /* i2c auxiliary bus used for driving magnetometer */
+#endif
break;
default:
/* declare i2c auxiliary bus */
Disable i2c mux for supported 9xxx chips when a Kconfig option is enabled. Add the new Kconfig option for enabling control of 9xxx magnetometer using the i2c master of the chip. Since it has to be explicitly enabled, we assure retro-compatibility with existing configuration. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> --- drivers/iio/imu/inv_mpu6050/Kconfig | 9 +++++++++ drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 5 +++++ 2 files changed, 14 insertions(+)