summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2017-03-26 14:11:00 +0300
committerJonathan Cameron <jic23@kernel.org>2017-04-02 12:12:08 +0300
commit0c8f492dd7ddf0dd381fa63b76066c0966d8dd73 (patch)
treecef8d154a4e2702515cbaeeedf549b5403bd8a82 /drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
parent3cc17e61d4dd9594fc6a2d15d88bb91f4bc61e75 (diff)
downloadlinux-0c8f492dd7ddf0dd381fa63b76066c0966d8dd73.tar.xz
iio:imu:mpu6050 add explicit mpu9250 support
The mpu9250 is a SIP containing an mpu6500 and an ak8975. If this was all there was too it there would be no need for explicit handling in the driver. Arguably the bindings would also only reflect the presence of an mpu6500 with the ak8975 hanging off it, as the kernel doesn't care that they are in one package. However, the WHOAMI value changes as well so best to add explicit support. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c')
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index a8e6330cb906..64b5f5b92200 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -178,6 +178,7 @@ static const struct i2c_device_id inv_mpu_id[] = {
{"mpu6050", INV_MPU6050},
{"mpu6500", INV_MPU6500},
{"mpu9150", INV_MPU9150},
+ {"mpu9250", INV_MPU9250},
{"icm20608", INV_ICM20608},
{}
};
@@ -198,6 +199,10 @@ static const struct of_device_id inv_of_match[] = {
.data = (void *)INV_MPU9150
},
{
+ .compatible = "invensense,mpu9250",
+ .data = (void *)INV_MPU9250
+ },
+ {
.compatible = "invensense,icm20608",
.data = (void *)INV_ICM20608
},