Merge tag 'gfs2-v6.0-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / Documentation / iio / bno055.rst
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ==============================
4 BNO055 driver
5 ==============================
6
7 1. Overview
8 ===========
9
10 This driver supports Bosch BNO055 IMUs (on both serial and I2C busses).
11
12 Accelerometer, magnetometer and gyroscope measures are always provided.
13 When "fusion_enable" sysfs attribute is set to 1, orientation (both Euler
14 angles and quaternion), linear velocity and gravity vector are also
15 provided, but some sensor settings (e.g. low pass filtering and range)
16 became locked (the IMU firmware controls them).
17
18 This driver supports also IIO buffers.
19
20 2. Calibration
21 ==============
22
23 The IMU continuously performs an autocalibration procedure if (and only if)
24 operating in fusion mode. The magnetometer autocalibration can however be
25 disabled writing 0 in the sysfs in_magn_calibration_fast_enable attribute.
26
27 The driver provides access to autocalibration flags (i.e. you can known if
28 the IMU has successfully autocalibrated) and to the calibration data blob.
29
30 The user can save this blob in a firmware file (i.e. in /lib/firmware) that
31 the driver looks for at probe time. If found, then the IMU is initialized
32 with this calibration data. This saves the user from performing the
33 calibration procedure every time (which consist of moving the IMU in
34 various way).
35
36 The driver looks for calibration data file using two different names: first
37 a file whose name is suffixed with the IMU unique ID (exposed in sysfs as
38 serial_number) is searched for; this is useful when there is more than one
39 IMU instance. If this file is not found, then a "generic" calibration file
40 is searched for (which can be used when only one IMU is present, without
41 struggling with fancy names, that change on each device).
42
43 Valid calibration file names would be e.g.
44  bno055-caldata-0e7c26a33541515120204a35342b04ff.dat
45  bno055-caldata.dat
46
47 In non-fusion mode the IIO 'offset' attributes provide access to the
48 offsets from calibration data (if any), so that the user can apply them to
49 the accel, angvel and magn IIO attributes. In fusion mode they are not
50 needed (the IMU firmware internally applies those corrections) and they
51 read as zero.