Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7af1d001 authored by Luo Weizhang's avatar Luo Weizhang
Browse files

drivers: iio: InvenSense ICM20689 driver



The ICM20689 sensor is a 6-axis gyro/accel combo
device. This is a referrence driver followed the
Kernel IIO architecture. The sample rate is up to
8K if it's triggered by SMD.

CRs-fixed: 1039160
Change-Id: I8ca1c1db13be9e31ee4e9c55bdaeed72ffa94a48
Signed-off-by: default avatarLuo Weizhang <luow@codeaurora.org>
parent 8eefef21
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
The ICM20689 sensor is 6-axis gyroscope+accelerometer combo
device which is made by InvenSense Inc. It can be accessed
via SPI bus with max frequency up to 8MHz. The recommended
SPI mode is the mode 3(CPOL=1, CPHA=1).

The datasheet can be found as the following link:
https://www.invensense.com/products/motion-tracking/6-axis/icm-20689/


Required properties:

 - compatible		: Should be "invn,icm20689".
 - reg		: the Chip select ID.
 - spi-max-frequency: the SPI bus max frequency

Optional properties:
 - invn,icm20689-irq:  the irq gpio. This is not used if
 using SMD to trigger. this is needed only if using the
 device IRQ to trigger. Only using SMD to trigger can
 support 8K sample rate.

 - spi-cpol		: SPI MODE(CPOL)
 - spi-cpha		: SPI MODE(CPHA)

Example:
	spi@78b6000 {
		icm20689-spi@0 {
			compatible = "invn,icm20689";
			reg = <0>;
			spi-max-frequency = <8000000>;
			invn,icm20689-irq = <&msm_gpio 96 0>;
			spi-cpol;
			spi-cpha;
		};
	};
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ config ADIS16480
	  ADIS16485, ADIS16488 inertial sensors.

source "drivers/iio/imu/inv_mpu6050/Kconfig"
source "drivers/iio/imu/inv_icm20689/Kconfig"

endmenu

+1 −0
Original line number Diff line number Diff line
@@ -14,3 +14,4 @@ adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o

obj-y += inv_mpu6050/
obj-y += inv_icm20689/
+14 −0
Original line number Diff line number Diff line
#
# inv-icm20689 drivers for Invensense MPU devices and combos
#

config INV_ICM20689_IIO
	tristate "Invensense ICM20689 devices"
	depends on SPI && SYSFS && CONFIG_MSM_SMD
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
	  This driver supports the Invensense ICM20689 devices.
	  It is a gyroscope/accelerometer combo device.
	  This driver can be built as a module. The module will be called
	  inv-icm20689.
+6 −0
Original line number Diff line number Diff line
#
# Makefile for Invensense icm20689 device.
#

obj-$(CONFIG_INV_ICM20689_IIO) += inv-icm20689.o
inv-icm20689-objs := inv_icm20689_core.o inv_icm20689_ring.o inv_icm20689_trigger.o smd_trig.o
Loading