From: Andrea Merello <[email protected]>
The bno055 driver is rather complex and have some oddities and not-obvious
things that worth to document (e.g. calibration files).
Signed-off-by: Andrea Merello <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
---
Documentation/iio/bno055.rst | 50 ++++++++++++++++++++++++++++++++++++
Documentation/iio/index.rst | 2 ++
2 files changed, 52 insertions(+)
create mode 100644 Documentation/iio/bno055.rst
diff --git a/Documentation/iio/bno055.rst b/Documentation/iio/bno055.rst
new file mode 100644
index 000000000000..af21376d7a25
--- /dev/null
+++ b/Documentation/iio/bno055.rst
@@ -0,0 +1,50 @@
+.. 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.
diff --git a/Documentation/iio/index.rst b/Documentation/iio/index.rst
index 58b7a4ebac51..1b7292c58cd0 100644
--- a/Documentation/iio/index.rst
+++ b/Documentation/iio/index.rst
@@ -10,3 +10,5 @@ Industrial I/O
iio_configfs
ep93xx_adc
+
+ bno055
--
2.17.1
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v5.19-rc4 next-20220701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/andrea-merello-iit-it/Add-support-for-Bosch-BNO055-IMU/20220614-203754
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
reproduce: make htmldocs
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
>> Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
vim +2 Documentation/iio/bno055.rst
> 2 ==============================
3 BNO055 driver
4 ==============================
5
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On Sun, Jul 03, 2022 at 03:58:15PM +0800, kernel test robot wrote:
> Hi,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on jic23-iio/togreg]
> [also build test WARNING on linus/master v5.19-rc4 next-20220701]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/intel-lab-lkp/linux/commits/andrea-merello-iit-it/Add-support-for-Bosch-BNO055-IMU/20220614-203754
> base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> reproduce: make htmldocs
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <[email protected]>
>
> All warnings (new ones prefixed by >>):
>
> >> Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
>
> vim +2 Documentation/iio/bno055.rst
>
> > 2 ==============================
> 3 BNO055 driver
> 4 ==============================
> 5
>
Here's the fixup:
---- >8 ----
From bb8524aa4719e54389065548c86155cbee638357 Mon Sep 17 00:00:00 2001
From: Bagas Sanjaya <[email protected]>
Date: Sun, 3 Jul 2022 18:37:44 +0700
Subject: [PATCH] fixup for "docs: iio: add documentation for BNO055 driver"
kernel test robot reported htmldocs warning:
Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
Add missing blank between SPDX line and the page title to fix the warning.
Link: https://lore.kernel.org/lkml/[email protected]/
Reported-by: kernel test robot <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Andrea Merello <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
Documentation/iio/bno055.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/iio/bno055.rst b/Documentation/iio/bno055.rst
index af21376d7a2533..9a489a79d8f5a8 100644
--- a/Documentation/iio/bno055.rst
+++ b/Documentation/iio/bno055.rst
@@ -1,4 +1,5 @@
.. SPDX-License-Identifier: GPL-2.0
+
==============================
BNO055 driver
==============================
---- >8 ----
--
An old man doll... just what I always wanted! - Clara
On Sun, Jul 3, 2022 at 3:11 PM Bagas Sanjaya <[email protected]> wrote:
> On Sun, Jul 03, 2022 at 03:58:15PM +0800, kernel test robot wrote:
Please, submit it properly.
You may add my Reviewed-by: Andy Shevchenko <[email protected]>
(I deliberately put it on a wrong line so no tools will catch it up
with improper commit message)
> From bb8524aa4719e54389065548c86155cbee638357 Mon Sep 17 00:00:00 2001
> From: Bagas Sanjaya <[email protected]>
> Date: Sun, 3 Jul 2022 18:37:44 +0700
> Subject: [PATCH] fixup for "docs: iio: add documentation for BNO055 driver"
>
> kernel test robot reported htmldocs warning:
>
> Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
>
> Add missing blank between SPDX line and the page title to fix the warning.
>
> Link: https://lore.kernel.org/lkml/[email protected]/
> Reported-by: kernel test robot <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: Andrea Merello <[email protected]>
> Signed-off-by: Bagas Sanjaya <[email protected]>
> ---
> Documentation/iio/bno055.rst | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/iio/bno055.rst b/Documentation/iio/bno055.rst
> index af21376d7a2533..9a489a79d8f5a8 100644
> --- a/Documentation/iio/bno055.rst
> +++ b/Documentation/iio/bno055.rst
> @@ -1,4 +1,5 @@
> .. SPDX-License-Identifier: GPL-2.0
> +
> ==============================
> BNO055 driver
> ==============================
>
--
With Best Regards,
Andy Shevchenko
On 7/3/22 21:00, Andy Shevchenko wrote:
> On Sun, Jul 3, 2022 at 3:11 PM Bagas Sanjaya <[email protected]> wrote:
>> On Sun, Jul 03, 2022 at 03:58:15PM +0800, kernel test robot wrote:
>
> Please, submit it properly.
> You may add my Reviewed-by: Andy Shevchenko <[email protected]>
>
> (I deliberately put it on a wrong line so no tools will catch it up
> with improper commit message)
OK, thanks.
--
An old man doll... just what I always wanted! - Clara
kernel test robot reported htmldocs warning:
Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
The warning above is caused by missing blank line separator between SPDX
identifier and page title.
Add the blank line to fix the warning.
Link: https://lore.kernel.org/lkml/[email protected]/
Fixes: ec0c70cb45507d ("docs: iio: add documentation for BNO055 driver")
Reported-by: kernel test robot <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Andrea Merello <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Matt Ranostay <[email protected]>
Cc: Alexandru Ardelean <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected] (open list)
Signed-off-by: Bagas Sanjaya <[email protected]>
---
Changes since v1 [1]:
- Collect Reviewed-by from Andy Shevchenko
- Explain why the warning is triggered
- No code changes
This patch is based on "Add support for Bosch BNO055 IMU" series [2]
as fixup for BNO055 documentation (patch [14/14])
[1]: https://lore.kernel.org/lkml/[email protected]/
[2]: https://lore.kernel.org/lkml/[email protected]/
Documentation/iio/bno055.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/iio/bno055.rst b/Documentation/iio/bno055.rst
index af21376d7a2533..9a489a79d8f5a8 100644
--- a/Documentation/iio/bno055.rst
+++ b/Documentation/iio/bno055.rst
@@ -1,4 +1,5 @@
.. SPDX-License-Identifier: GPL-2.0
+
==============================
BNO055 driver
==============================
--
An old man doll... just what I always wanted! - Clara
On Mon, Jul 4, 2022 at 5:41 AM Bagas Sanjaya <[email protected]> wrote:
>
> kernel test robot reported htmldocs warning:
>
> Documentation/iio/bno055.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
>
> The warning above is caused by missing blank line separator between SPDX
> identifier and page title.
>
> Add the blank line to fix the warning.
>
> Link: https://lore.kernel.org/lkml/[email protected]/
> Fixes: ec0c70cb45507d ("docs: iio: add documentation for BNO055 driver")
> Reported-by: kernel test robot <[email protected]>
> Reviewed-by: Andy Shevchenko <[email protected]>
> Cc: Jonathan Corbet <[email protected]>
> Cc: Andrea Merello <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Lars-Peter Clausen <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Matt Ranostay <[email protected]>
> Cc: Alexandru Ardelean <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected] (open list)
It's a very noisy Cc list which will go in the git history. Instead,
use --to and --cc parameters of `git format-patch`. Maintainers
usually use `b4` tool that adds a Link tag to the patch itself on the
Lore archive which will keep track on the Cc list anyway.
--
With Best Regards,
Andy Shevchenko
On 7/5/22 02:49, Andy Shevchenko wrote:
>> Cc: Jonathan Corbet <[email protected]>
>> Cc: Andrea Merello <[email protected]>
>> Cc: Jonathan Cameron <[email protected]>
>> Cc: Mauro Carvalho Chehab <[email protected]>
>> Cc: Lars-Peter Clausen <[email protected]>
>> Cc: Rob Herring <[email protected]>
>> Cc: Matt Ranostay <[email protected]>
>> Cc: Alexandru Ardelean <[email protected]>
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected] (open list)
>
> It's a very noisy Cc list which will go in the git history. Instead,
> use --to and --cc parameters of `git format-patch`. Maintainers
> usually use `b4` tool that adds a Link tag to the patch itself on the
> Lore archive which will keep track on the Cc list anyway.
>
Hi Andy,
Thanks for reminding me.
I think something like `b4 am -l`, right?
Anyway, should I resend (reroll)?
--
An old man doll... just what I always wanted! - Clara
On Tue, Jul 5, 2022 at 3:13 AM Bagas Sanjaya <[email protected]> wrote:
> On 7/5/22 02:49, Andy Shevchenko wrote:
...
> >> Cc: Jonathan Corbet <[email protected]>
> >> Cc: Andrea Merello <[email protected]>
> >> Cc: Jonathan Cameron <[email protected]>
> >> Cc: Mauro Carvalho Chehab <[email protected]>
> >> Cc: Lars-Peter Clausen <[email protected]>
> >> Cc: Rob Herring <[email protected]>
> >> Cc: Matt Ranostay <[email protected]>
> >> Cc: Alexandru Ardelean <[email protected]>
> >> Cc: [email protected]
> >> Cc: [email protected]
> >> Cc: [email protected]
> >> Cc: [email protected] (open list)
> >
> > It's a very noisy Cc list which will go in the git history. Instead,
> > use --to and --cc parameters of `git format-patch`. Maintainers
> > usually use `b4` tool that adds a Link tag to the patch itself on the
> > Lore archive which will keep track on the Cc list anyway.
> Thanks for reminding me.
>
> I think something like `b4 am -l`, right?
>
> Anyway, should I resend (reroll)?
Depends on the maintainer's wishes. Maybe they can drop them when
applying, I dunno.
--
With Best Regards,
Andy Shevchenko
On Tue, 5 Jul 2022 11:02:32 +0200
Andy Shevchenko <[email protected]> wrote:
> On Tue, Jul 5, 2022 at 3:13 AM Bagas Sanjaya <[email protected]> wrote:
> > On 7/5/22 02:49, Andy Shevchenko wrote:
>
> ...
>
> > >> Cc: Jonathan Corbet <[email protected]>
> > >> Cc: Andrea Merello <[email protected]>
> > >> Cc: Jonathan Cameron <[email protected]>
> > >> Cc: Mauro Carvalho Chehab <[email protected]>
> > >> Cc: Lars-Peter Clausen <[email protected]>
> > >> Cc: Rob Herring <[email protected]>
> > >> Cc: Matt Ranostay <[email protected]>
> > >> Cc: Alexandru Ardelean <[email protected]>
> > >> Cc: [email protected]
> > >> Cc: [email protected]
> > >> Cc: [email protected]
> > >> Cc: [email protected] (open list)
> > >
> > > It's a very noisy Cc list which will go in the git history. Instead,
> > > use --to and --cc parameters of `git format-patch`. Maintainers
> > > usually use `b4` tool that adds a Link tag to the patch itself on the
> > > Lore archive which will keep track on the Cc list anyway.
>
> > Thanks for reminding me.
> >
> > I think something like `b4 am -l`, right?
> >
> > Anyway, should I resend (reroll)?
>
> Depends on the maintainer's wishes. Maybe they can drop them when
> applying, I dunno.
>
At the moment this is a fix to a series we haven't actually accepted.
Nice to have an all, but up to Andrea on how to handle it.
One reasonable option would be just to squish it into the original
patch for v7 with an appropriate note in the patch description / changelog.
Thanks,
Jonathan