mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
iio: imu: add Bosch Sensortec BNO055 core driver
Add the core driver for the BNO055 IMU from Bosch. This IMU can be connected via both serial and I2C busses; separate patches will add support for them. The driver supports "AMG" (Accelerometer, Magnetometer, Gyroscope) mode, that provides raw data from the said internal sensors, and a couple of "fusion" modes (i.e. the IMU also does calculations in order to provide euler angles, quaternions, linear acceleration and gravity measurements). In fusion modes the AMG data is still available (with some calibration refinements done by the IMU), but certain settings such as low pass filters cut-off frequency and sensors' ranges are fixed, while in AMG mode they can be customized; this is why AMG mode can still be interesting. Signed-off-by: Andrea Merello <andrea.merello@iit.it> Link: https://lore.kernel.org/r/20220907132205.28021-9-andrea.merello@iit.it Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
e0d27ea3ba
commit
4aefe1c2bd
@ -52,6 +52,7 @@ config ADIS16480
|
|||||||
ADIS16485, ADIS16488 inertial sensors.
|
ADIS16485, ADIS16488 inertial sensors.
|
||||||
|
|
||||||
source "drivers/iio/imu/bmi160/Kconfig"
|
source "drivers/iio/imu/bmi160/Kconfig"
|
||||||
|
source "drivers/iio/imu/bno055/Kconfig"
|
||||||
|
|
||||||
config FXOS8700
|
config FXOS8700
|
||||||
tristate
|
tristate
|
||||||
|
@ -15,6 +15,7 @@ adis_lib-$(CONFIG_IIO_ADIS_LIB_BUFFER) += adis_buffer.o
|
|||||||
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
|
obj-$(CONFIG_IIO_ADIS_LIB) += adis_lib.o
|
||||||
|
|
||||||
obj-y += bmi160/
|
obj-y += bmi160/
|
||||||
|
obj-y += bno055/
|
||||||
|
|
||||||
obj-$(CONFIG_FXOS8700) += fxos8700_core.o
|
obj-$(CONFIG_FXOS8700) += fxos8700_core.o
|
||||||
obj-$(CONFIG_FXOS8700_I2C) += fxos8700_i2c.o
|
obj-$(CONFIG_FXOS8700_I2C) += fxos8700_i2c.o
|
||||||
|
4
drivers/iio/imu/bno055/Kconfig
Normal file
4
drivers/iio/imu/bno055/Kconfig
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
config BOSCH_BNO055
|
||||||
|
tristate
|
3
drivers/iio/imu/bno055/Makefile
Normal file
3
drivers/iio/imu/bno055/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
obj-$(CONFIG_BOSCH_BNO055) += bno055.o
|
1685
drivers/iio/imu/bno055/bno055.c
Normal file
1685
drivers/iio/imu/bno055/bno055.c
Normal file
File diff suppressed because it is too large
Load Diff
13
drivers/iio/imu/bno055/bno055.h
Normal file
13
drivers/iio/imu/bno055/bno055.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
#ifndef __BNO055_H__
|
||||||
|
#define __BNO055_H__
|
||||||
|
|
||||||
|
#include <linux/regmap.h>
|
||||||
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
struct device;
|
||||||
|
int bno055_probe(struct device *dev, struct regmap *regmap,
|
||||||
|
int xfer_burst_break_thr, bool sw_reset);
|
||||||
|
extern const struct regmap_config bno055_regmap_config;
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user