diff options
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/Kconfig | 10 | ||||
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 6 | ||||
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 | ||||
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 1 |
5 files changed, 14 insertions, 6 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig index a7f557af4389..c05d474587d2 100644 --- a/drivers/iio/imu/inv_mpu6050/Kconfig +++ b/drivers/iio/imu/inv_mpu6050/Kconfig | |||
@@ -14,10 +14,8 @@ config INV_MPU6050_I2C | |||
14 | select I2C_MUX | 14 | select I2C_MUX |
15 | select REGMAP_I2C | 15 | select REGMAP_I2C |
16 | help | 16 | help |
17 | This driver supports the Invensense MPU6050 devices. | 17 | This driver supports the Invensense MPU6050/6500/9150 motion tracking |
18 | This driver can also support MPU6500 in MPU6050 compatibility mode | 18 | devices over I2C. |
19 | and also in MPU6500 mode with some limitations. | ||
20 | It is a gyroscope/accelerometer combo device. | ||
21 | This driver can be built as a module. The module will be called | 19 | This driver can be built as a module. The module will be called |
22 | inv-mpu6050-i2c. | 20 | inv-mpu6050-i2c. |
23 | 21 | ||
@@ -27,7 +25,7 @@ config INV_MPU6050_SPI | |||
27 | select INV_MPU6050_IIO | 25 | select INV_MPU6050_IIO |
28 | select REGMAP_SPI | 26 | select REGMAP_SPI |
29 | help | 27 | help |
30 | This driver supports the Invensense MPU6050 devices. | 28 | This driver supports the Invensense MPU6000/6500/9150 motion tracking |
31 | It is a gyroscope/accelerometer combo device. | 29 | devices over SPI. |
32 | This driver can be built as a module. The module will be called | 30 | This driver can be built as a module. The module will be called |
33 | inv-mpu6050-spi. | 31 | inv-mpu6050-spi. |
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 4152f2fcf598..b269b375ca34 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | |||
@@ -108,6 +108,12 @@ static const struct inv_mpu6050_hw hw_info[] = { | |||
108 | .reg = ®_set_6050, | 108 | .reg = ®_set_6050, |
109 | .config = &chip_config_6050, | 109 | .config = &chip_config_6050, |
110 | }, | 110 | }, |
111 | { | ||
112 | .whoami = INV_MPU9150_WHOAMI_VALUE, | ||
113 | .name = "MPU9150", | ||
114 | .reg = ®_set_6050, | ||
115 | .config = &chip_config_6050, | ||
116 | }, | ||
111 | }; | 117 | }; |
112 | 118 | ||
113 | int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask) | 119 | int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask) |
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c index bb1a7b1462f5..1a424a6561de 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | |||
@@ -202,6 +202,7 @@ static int inv_mpu_remove(struct i2c_client *client) | |||
202 | static const struct i2c_device_id inv_mpu_id[] = { | 202 | static const struct i2c_device_id inv_mpu_id[] = { |
203 | {"mpu6050", INV_MPU6050}, | 203 | {"mpu6050", INV_MPU6050}, |
204 | {"mpu6500", INV_MPU6500}, | 204 | {"mpu6500", INV_MPU6500}, |
205 | {"mpu9150", INV_MPU9150}, | ||
205 | {} | 206 | {} |
206 | }; | 207 | }; |
207 | 208 | ||
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index fb45cc76e4e4..47ca25b94a73 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | |||
@@ -68,6 +68,7 @@ enum inv_devices { | |||
68 | INV_MPU6050, | 68 | INV_MPU6050, |
69 | INV_MPU6500, | 69 | INV_MPU6500, |
70 | INV_MPU6000, | 70 | INV_MPU6000, |
71 | INV_MPU9150, | ||
71 | INV_NUM_PARTS | 72 | INV_NUM_PARTS |
72 | }; | 73 | }; |
73 | 74 | ||
@@ -222,6 +223,7 @@ struct inv_mpu6050_state { | |||
222 | #define INV_MPU6000_WHOAMI_VALUE 0x68 | 223 | #define INV_MPU6000_WHOAMI_VALUE 0x68 |
223 | #define INV_MPU6050_WHOAMI_VALUE 0x68 | 224 | #define INV_MPU6050_WHOAMI_VALUE 0x68 |
224 | #define INV_MPU6500_WHOAMI_VALUE 0x70 | 225 | #define INV_MPU6500_WHOAMI_VALUE 0x70 |
226 | #define INV_MPU9150_WHOAMI_VALUE 0x68 | ||
225 | 227 | ||
226 | /* scan element definition */ | 228 | /* scan element definition */ |
227 | enum inv_mpu6050_scan { | 229 | enum inv_mpu6050_scan { |
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c index a0f8df239933..190a4a51c830 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | |||
@@ -81,6 +81,7 @@ static int inv_mpu_remove(struct spi_device *spi) | |||
81 | static const struct spi_device_id inv_mpu_id[] = { | 81 | static const struct spi_device_id inv_mpu_id[] = { |
82 | {"mpu6000", INV_MPU6000}, | 82 | {"mpu6000", INV_MPU6000}, |
83 | {"mpu6500", INV_MPU6500}, | 83 | {"mpu6500", INV_MPU6500}, |
84 | {"mpu9150", INV_MPU9150}, | ||
84 | {} | 85 | {} |
85 | }; | 86 | }; |
86 | 87 | ||