Skip to content

Commit 2eef5a9

Browse files
andreamerellojic23
authored andcommitted
iio: imu: add BNO055 serdev driver
Add a serdev driver for communicating to a BNO055 IMU via serial bus, and enable the BNO055 core driver to work in this scenario. Signed-off-by: Andrea Merello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 21f95c7 commit 2eef5a9

File tree

5 files changed

+693
-0
lines changed

5 files changed

+693
-0
lines changed

drivers/iio/imu/bno055/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,13 @@
22

33
config BOSCH_BNO055
44
tristate
5+
6+
config BOSCH_BNO055_SERIAL
7+
tristate "Bosch BNO055 attached via UART"
8+
depends on SERIAL_DEV_BUS
9+
select BOSCH_BNO055
10+
help
11+
Enable this to support Bosch BNO055 IMUs attached via UART.
12+
13+
This driver can also be built as a module. If so, the module will be
14+
called bno055_sl.

drivers/iio/imu/bno055/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
obj-$(CONFIG_BOSCH_BNO055) += bno055.o
4+
obj-$(CONFIG_BOSCH_BNO055_SERIAL) += bno055_ser.o
5+
bno055_ser-y := bno055_ser_core.o
6+
# define_trace.h needs to know how to find our header
7+
CFLAGS_bno055_ser_trace.o := -I$(src)
8+
bno055_ser-$(CONFIG_TRACING) += bno055_ser_trace.o

0 commit comments

Comments
 (0)