Skip to content

Commit

Permalink
iio: imu: Add support for the FXOS8700 IMU
Browse files Browse the repository at this point in the history
FXOS8700CQ is a small, low-power, 3-axis linear accelerometer and 3-axis
magnetometer combined into a single package. The device features a
selectable I2C or point-to-point SPI serial interface with 14-bit
accelerometer and 16-bit magnetometer ADC resolution along with
smart-embedded functions.

FXOS8700CQ has dynamically selectable accelerationfull-scale ranges of
±2 g/±4 g/±8 g and a fixed magnetic measurement range of ±1200 μT.
Output data rates (ODR) from 1.563 Hz to 800 Hz are selectable by the user
for each sensor. Interleaved magnetic and acceleration data is available
at ODR rates of up to 400 Hz. FXOS8700CQ is available in a plastic QFN
package and it is guaranteed to operate over the extended temperature
range of –40 °C to +85 °C.

TODO: Trigger and IRQ configuration support

Datasheet:
  http://cache.freescale.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf

Signed-off-by: Robert Jones <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
Bobby-Soliis-Jones authored and jic23 committed Oct 22, 2019
1 parent 4d6f939 commit 84e5ddd
Show file tree
Hide file tree
Showing 6 changed files with 821 additions and 0 deletions.
27 changes: 27 additions & 0 deletions drivers/iio/imu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,33 @@ config ADIS16480

source "drivers/iio/imu/bmi160/Kconfig"

config FXOS8700
tristate

config FXOS8700_I2C
tristate "NXP FXOS8700 I2C driver"
depends on I2C
select FXOS8700
select REGMAP_I2C
help
Say yes here to build support for the NXP FXOS8700 m+g combo
sensor on I2C.

This driver can also be built as a module. If so, the module will be
called fxos8700_i2c.

config FXOS8700_SPI
tristate "NXP FXOS8700 SPI driver"
depends on SPI
select FXOS8700
select REGMAP_SPI
help
Say yes here to build support for the NXP FXOS8700 m+g combo
sensor on SPI.

This driver can also be built as a module. If so, the module will be
called fxos8700_spi.

config KMX61
tristate "Kionix KMX61 6-axis accelerometer and magnetometer"
depends on I2C
Expand Down
5 changes: 5 additions & 0 deletions drivers/iio/imu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o

obj-y += bmi160/

obj-$(CONFIG_FXOS8700) += fxos8700_core.o
obj-$(CONFIG_FXOS8700_I2C) += fxos8700_i2c.o
obj-$(CONFIG_FXOS8700_SPI) += fxos8700_spi.o

obj-y += inv_mpu6050/

obj-$(CONFIG_KMX61) += kmx61.o
Expand Down
10 changes: 10 additions & 0 deletions drivers/iio/imu/fxos8700.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef FXOS8700_H_
#define FXOS8700_H_

extern const struct regmap_config fxos8700_regmap_config;

int fxos8700_core_probe(struct device *dev, struct regmap *regmap,
const char *name, bool use_spi);

#endif /* FXOS8700_H_ */
Loading

0 comments on commit 84e5ddd

Please sign in to comment.