mbox series

[v2,0/7] add magnetometer support for MPU925x

Message ID 20190912105717.15564-1-jmaneyrol@invensense.com (mailing list archive)
Headers show
Series add magnetometer support for MPU925x | expand

Message

Jean-Baptiste Maneyrol Sept. 12, 2019, 10:57 a.m. UTC
This series of patches adds support of magnetometer inside MPU925x chips.
It is using the MPU i2c master to drive the integrated magnetometer and
read data into the MPU FIFO.

Driving the magnetometer requires to disable access to i2c auxiliary bus.
To avoid breakage in existing setups we are disabling magnetometer support
if the i2c auxiliary bus is used (i2c-gate dt node defined).

Changes in v2:
* delete Kconfig option and check for dt i2c-gate instead
* simplification by using the same scan defines than mpu6050
* simplify magnetometer support by having 1 unique module inv_mpu_magn
* fixes and cleanup

Jean-Baptiste Maneyrol (7):
  iio: imu: inv_mpu6050: disable i2c mux for MPU925x
  iio: imu: inv_mpu6050: add header include protection macro
  iio: imu: inv_mpu6050: add defines for supporting 9-axis chips
  iio: imu: inv_mpu6050: fix objects syntax in Makefile
  iio: imu: inv_mpu6050: helpers for using i2c master on auxiliary bus
  iio: imu: inv_mpu6050: add MPU925x magnetometer support
  iio: imu: inv_mpu6050: add fifo support for magnetometer data

 drivers/iio/imu/inv_mpu6050/Makefile          |   7 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_aux.c     | 184 +++++++++
 drivers/iio/imu/inv_mpu6050/inv_mpu_aux.h     |  46 +++
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 152 +++++++-
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c     |  60 ++-
 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h     |  70 +++-
 drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c    | 355 ++++++++++++++++++
 drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h    |  36 ++
 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c    |  11 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  86 ++++-
 10 files changed, 976 insertions(+), 31 deletions(-)
 create mode 100644 drivers/iio/imu/inv_mpu6050/inv_mpu_aux.c
 create mode 100644 drivers/iio/imu/inv_mpu6050/inv_mpu_aux.h
 create mode 100644 drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c
 create mode 100644 drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h