[PATCH v3 0/7] add magnetometer support for MPU925x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Changes in v3:
* move documentation from header to implementation for mpu i2c aux helpers

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     | 203 ++++++++++
 drivers/iio/imu/inv_mpu6050/inv_mpu_aux.h     |  19 +
 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, 968 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

-- 
2.17.1





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux