docs: iio: add documentation for BNO055 driver

The bno055 driver is rather complex and have some oddities and not-obvious
things that worth to document (e.g. calibration files).

This patch also contains this [0] fix squashed in.

[0] https://lore.kernel.org/lkml/20220704034041.15448-1-bagasdotme@gmail.com/

Signed-off-by: Andrea Merello <andrea.merello@iit.it>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220907132205.28021-15-andrea.merello@iit.it
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Andrea Merello 2022-09-07 15:22:05 +02:00 committed by Jonathan Cameron
parent 50fe984f37
commit 130476acfd
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
.. SPDX-License-Identifier: GPL-2.0
==============================
BNO055 driver
==============================
1. Overview
===========
This driver supports Bosch BNO055 IMUs (on both serial and I2C busses).
Accelerometer, magnetometer and gyroscope measures are always provided.
When "fusion_enable" sysfs attribute is set to 1, orientation (both Euler
angles and quaternion), linear velocity and gravity vector are also
provided, but some sensor settings (e.g. low pass filtering and range)
became locked (the IMU firmware controls them).
This driver supports also IIO buffers.
2. Calibration
==============
The IMU continuously performs an autocalibration procedure if (and only if)
operating in fusion mode. The magnetometer autocalibration can however be
disabled writing 0 in the sysfs in_magn_calibration_fast_enable attribute.
The driver provides access to autocalibration flags (i.e. you can known if
the IMU has successfully autocalibrated) and to the calibration data blob.
The user can save this blob in a firmware file (i.e. in /lib/firmware) that
the driver looks for at probe time. If found, then the IMU is initialized
with this calibration data. This saves the user from performing the
calibration procedure every time (which consist of moving the IMU in
various way).
The driver looks for calibration data file using two different names: first
a file whose name is suffixed with the IMU unique ID (exposed in sysfs as
serial_number) is searched for; this is useful when there is more than one
IMU instance. If this file is not found, then a "generic" calibration file
is searched for (which can be used when only one IMU is present, without
struggling with fancy names, that change on each device).
Valid calibration file names would be e.g.
bno055-caldata-0e7c26a33541515120204a35342b04ff.dat
bno055-caldata.dat
In non-fusion mode the IIO 'offset' attributes provide access to the
offsets from calibration data (if any), so that the user can apply them to
the accel, angvel and magn IIO attributes. In fusion mode they are not
needed (the IMU firmware internally applies those corrections) and they
read as zero.

View File

@ -10,3 +10,5 @@ Industrial I/O
iio_configfs
ep93xx_adc
bno055