Skip to content

Commit 3b3df86

Browse files
committed
inv_mpu9250 added
1 parent b372c8b commit 3b3df86

20 files changed

+12569
-1
lines changed

drivers/iio/imu/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ config KMX61
3737
be called kmx61.
3838

3939
source "drivers/iio/imu/inv_mpu6050/Kconfig"
40+
source "drivers/iio/imu/inv_mpu9250/Kconfig"
4041

4142
endmenu
4243

@@ -50,4 +51,4 @@ config IIO_ADIS_LIB_BUFFER
5051
select IIO_TRIGGERED_BUFFER
5152
help
5253
A set of buffer helper functions for the Analog Devices ADIS* device
53-
family.
54+
family.

drivers/iio/imu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
1414
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
1515

1616
obj-y += inv_mpu6050/
17+
obj-y += inv_mpu9250/
1718

1819
obj-$(CONFIG_KMX61) += kmx61.o

drivers/iio/imu/inv_mpu9250/Kconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# inv-mpu-iio driver for Invensense MPU devices and combos
3+
#
4+
5+
config INV_MPU_IIO
6+
tristate "Invensense MPU devices"
7+
depends on I2C && SYSFS && IIO && IIO_KFIFO_BUF && IIO_TRIGGER && !INV_MPU
8+
default n
9+
help
10+
This driver supports the Invensense MPU devices.
11+
This includes MPU6050/MPU3050/MPU9150/ITG3500/MPU6500/MPU9250.
12+
This driver can be built as a module. The module will be called
13+
inv-mpu-iio.
14+
15+
config INV_IIO_MPU3050_ACCEL_SLAVE_BMA250
16+
bool "Invensense MPU3050 slave accelerometer device for bma250"
17+
depends on INV_MPU_IIO
18+
default n
19+
help
20+
This is slave device enable MPU3050 accelerometer slave device.
21+
Right now, it is only bma250. For other acceleromter device,
22+
it can be added to this menu if the proper interface is filled.
23+
There are some interface function to be defined.
24+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# inv-mpu drivers for Invensense MPU devices and combos
3+
#
4+
5+
config INV_MPU_IIO
6+
tristate "Invensense MPU devices"
7+
depends on I2C && SYSFS && IIO && IIO_KFIFO_BUF && IIO_TRIGGER && !INV_MPU
8+
default n
9+
help
10+
This driver supports the Invensense MPU devices.
11+
This driver can be built as a module. The module will be called
12+
inv-mpu-iio.

drivers/iio/imu/inv_mpu9250/Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Makefile for Invensense inv-mpu-iio device.
3+
#
4+
5+
obj-$(CONFIG_INV_MPU_IIO) += inv-mpu-iio.o
6+
7+
inv-mpu-iio-objs := inv_mpu_core.o
8+
inv-mpu-iio-objs += inv_mpu_ring.o
9+
inv-mpu-iio-objs += inv_mpu_trigger.o
10+
inv-mpu-iio-objs += inv_mpu_misc.o
11+
inv-mpu-iio-objs += inv_mpu3050_iio.o
12+
inv-mpu-iio-objs += dmpDefaultMPU6050.o
13+
inv-mpu-iio-objs += inv_slave_compass.o
14+
inv-mpu-iio-objs += inv_slave_pressure.o
15+
16+
CFLAGS_inv_mpu_core.o += -Idrivers/staging/iio
17+
CFLAGS_inv_mpu_ring.o += -Idrivers/staging/iio
18+
CFLAGS_inv_mpu_trigger.o += -Idrivers/staging/iio
19+
CFLAGS_inv_mpu_misc.o += -Idrivers/staging/iio
20+
CFLAGS_inv_mpu3050_iio.o += -Idrivers/staging/iio
21+
CFLAGS_dmpDefaultMPU6050.o += -Idrivers/staging/iio
22+
CFLAGS_inv_slave_compass.o += -Idrivers/staging/iio
23+
CFLAGS_inv_slave_pressure.o += -Idrivers/staging/iio
24+
25+
# the Bosch BMA250 driver is added to the inv-mpu device driver because it
26+
# must be connected to an MPU3050 device on the secondary slave bus.
27+
ifeq ($(CONFIG_INV_IIO_MPU3050_ACCEL_SLAVE_BMA250), y)
28+
inv-mpu-iio-objs += inv_slave_bma250.o
29+
CFLAGS_inv_slave_bma250.o += -Idrivers/staging/iio
30+
endif
31+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Makefile for Invensense inv-mpu-iio device.
3+
#
4+
5+
obj-$(CONFIG_INV_MPU_IIO) += inv-mpu-iio.o
6+
7+
inv-mpu-iio-objs := inv_mpu_core.o
8+
inv-mpu-iio-objs += inv_mpu_ring.o
9+
inv-mpu-iio-objs += inv_mpu_trigger.o
10+
inv-mpu-iio-objs += inv_mpu_misc.o
11+
inv-mpu-iio-objs += inv_mpu3050_iio.o
12+
inv-mpu-iio-objs += dmpDefaultMPU6050.o
13+
14+
# the Bosch BMA250 driver is added to the inv-mpu device driver because it
15+
# must be connected to an MPU3050 device on the secondary slave bus.
16+
inv-mpu-iio-objs += inv_slave_bma250.o
17+

0 commit comments

Comments
 (0)