Commit fbced0e9 authored by Crestez Dan Leonard's avatar Crestez Dan Leonard Committed by Jonathan Cameron

iio: inv_mpu6050: Add explicit support for MPU9150

This device is a package containing a MPU6050-like sensor and an AK8975
magnetometer. The magnetometer component is supported by the existing
ak8975 driver.

This patch also rephrases the Kconfig descriptions.
Signed-off-by: default avatarCrestez Dan Leonard <leonard.crestez@intel.com>
Acked-by: default avatarGe Gao <ggao@invensense.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bf1eb912
...@@ -14,10 +14,8 @@ config INV_MPU6050_I2C ...@@ -14,10 +14,8 @@ config INV_MPU6050_I2C
select I2C_MUX select I2C_MUX
select REGMAP_I2C select REGMAP_I2C
help help
This driver supports the Invensense MPU6050 devices. This driver supports the Invensense MPU6050/6500/9150 motion tracking
This driver can also support MPU6500 in MPU6050 compatibility mode devices over I2C.
and also in MPU6500 mode with some limitations.
It is a gyroscope/accelerometer combo device.
This driver can be built as a module. The module will be called This driver can be built as a module. The module will be called
inv-mpu6050-i2c. inv-mpu6050-i2c.
...@@ -27,7 +25,7 @@ config INV_MPU6050_SPI ...@@ -27,7 +25,7 @@ config INV_MPU6050_SPI
select INV_MPU6050_IIO select INV_MPU6050_IIO
select REGMAP_SPI select REGMAP_SPI
help help
This driver supports the Invensense MPU6050 devices. This driver supports the Invensense MPU6000/6500/9150 motion tracking
It is a gyroscope/accelerometer combo device. devices over SPI.
This driver can be built as a module. The module will be called This driver can be built as a module. The module will be called
inv-mpu6050-spi. inv-mpu6050-spi.
...@@ -108,6 +108,12 @@ static const struct inv_mpu6050_hw hw_info[] = { ...@@ -108,6 +108,12 @@ static const struct inv_mpu6050_hw hw_info[] = {
.reg = &reg_set_6050, .reg = &reg_set_6050,
.config = &chip_config_6050, .config = &chip_config_6050,
}, },
{
.whoami = INV_MPU9150_WHOAMI_VALUE,
.name = "MPU9150",
.reg = &reg_set_6050,
.config = &chip_config_6050,
},
}; };
int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask) int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask)
......
...@@ -202,6 +202,7 @@ static int inv_mpu_remove(struct i2c_client *client) ...@@ -202,6 +202,7 @@ static int inv_mpu_remove(struct i2c_client *client)
static const struct i2c_device_id inv_mpu_id[] = { static const struct i2c_device_id inv_mpu_id[] = {
{"mpu6050", INV_MPU6050}, {"mpu6050", INV_MPU6050},
{"mpu6500", INV_MPU6500}, {"mpu6500", INV_MPU6500},
{"mpu9150", INV_MPU9150},
{} {}
}; };
......
...@@ -68,6 +68,7 @@ enum inv_devices { ...@@ -68,6 +68,7 @@ enum inv_devices {
INV_MPU6050, INV_MPU6050,
INV_MPU6500, INV_MPU6500,
INV_MPU6000, INV_MPU6000,
INV_MPU9150,
INV_NUM_PARTS INV_NUM_PARTS
}; };
...@@ -222,6 +223,7 @@ struct inv_mpu6050_state { ...@@ -222,6 +223,7 @@ struct inv_mpu6050_state {
#define INV_MPU6000_WHOAMI_VALUE 0x68 #define INV_MPU6000_WHOAMI_VALUE 0x68
#define INV_MPU6050_WHOAMI_VALUE 0x68 #define INV_MPU6050_WHOAMI_VALUE 0x68
#define INV_MPU6500_WHOAMI_VALUE 0x70 #define INV_MPU6500_WHOAMI_VALUE 0x70
#define INV_MPU9150_WHOAMI_VALUE 0x68
/* scan element definition */ /* scan element definition */
enum inv_mpu6050_scan { enum inv_mpu6050_scan {
......
...@@ -81,6 +81,7 @@ static int inv_mpu_remove(struct spi_device *spi) ...@@ -81,6 +81,7 @@ static int inv_mpu_remove(struct spi_device *spi)
static const struct spi_device_id inv_mpu_id[] = { static const struct spi_device_id inv_mpu_id[] = {
{"mpu6000", INV_MPU6000}, {"mpu6000", INV_MPU6000},
{"mpu6500", INV_MPU6500}, {"mpu6500", INV_MPU6500},
{"mpu9150", INV_MPU9150},
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment