Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp818609pxb; Thu, 17 Feb 2022 15:43:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVYS7HixrxtB1EKK1zAWDOoCCBvNhtoKTgv6t7r8TRHs23vWWsHOXTvgOgz9xUqWBYyQTM X-Received: by 2002:a17:902:f253:b0:14d:a4ea:829d with SMTP id j19-20020a170902f25300b0014da4ea829dmr4890291plc.21.1645141388029; Thu, 17 Feb 2022 15:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645141388; cv=none; d=google.com; s=arc-20160816; b=014/1E6ntM0Hm+wTMZSeYO7pNkY+OSpQhvyBZNe1wDnhhCiy0AIb6YOlYOo/hWQCed cNLjZharP3EyKseogUZ6GpH6BL1RfxOStikTBwZzdP/4hDuyuMXs1Y5iQEV3XU6ZUJNN V9/+osrcuHSUL4FVFzKrkNIvAZOu5mPzKJKFctUCgk4ZySZR29OVyiOyoHhmNXJ0o/VT 64ylynNkusTwfm/NEqBsluvCI50gM6ZmieFKFjs/WxRocgzi6TbHHbjKzkEVMydyIM17 G2+5RvsbZG296wXj2tc40W1qotu9ysWp1/Rfyj7KuA2pJRKm7K+51793EokTEXFaydY/ V2dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x0CAWbNuIuDfQpbJainmJSxgl05KS6pI1nwvw77TVRY=; b=N95h6Js8Gtc7U/qNk32XUpyMvzSeBogW1wOLEjwvJdYnkp1A6C39JrCWw6GwmGOLuK /WRyTv75lGCR66T98+t1LwKIELbs46zoc30rMw7KPBdOf5Qd0tpPSWOf980ZmHAdfbOx 3EZ9kwVyKmZbhDmESBbSWuGlIj0TS7uZ7BsNMJaKRuJLHSLENHyHRkLC1bQTvkPHpSJl 5U92bkFtG5J4MkqJG5I3lb6ChzEXjY0JodltxGL9csIXC/i0Fg6eAz7wAN+RILRqhbeR Ry9C6MBIxKxJ/WXgp+APy9itN4kJ7oyk+e/S0tERf5kAOOBV+83QUzc4g16TOBTrvJjH 73xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XYjjMpDh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g190si9846978pgc.561.2022.02.17.15.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:43:08 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XYjjMpDh; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 842EA2F79FB; Thu, 17 Feb 2022 15:20:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243236AbiBQQ2Y (ORCPT + 99 others); Thu, 17 Feb 2022 11:28:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243182AbiBQQ1z (ORCPT ); Thu, 17 Feb 2022 11:27:55 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 934ABB2E08; Thu, 17 Feb 2022 08:27:37 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id d10so8516236eje.10; Thu, 17 Feb 2022 08:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x0CAWbNuIuDfQpbJainmJSxgl05KS6pI1nwvw77TVRY=; b=XYjjMpDhaV3y4guUdwjcp7pgm0CCJvpxAYqNX/uRe1b80YfpnK0ARRNBQuuarUXsmt IuoP9UGADm0phg5YjhICWB2TYsr8Q15w9dvHc8shFxuizpjNbhIo8BnklYElCvt1LVfH aHEjCRuS/wUZhdmJDKGXCXZH2MeGUT5QgqowghefD1jO/9ZYE8o3eZGL/FRNKnJPk8ni ky4p5t2DWKWEzWnNXX/Q+f4T3nvBS9CpocYX9sHIJdlvOprs79hV9JmszQBdz25z9bUi Q2t7B+W8f1RiL4+buQH0S5DKRQ9D5BHYgteg7ctM8Z1DIkqdwZjesChIj/808a++1E4J cu2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x0CAWbNuIuDfQpbJainmJSxgl05KS6pI1nwvw77TVRY=; b=5v4SbT74eWBvdrpKEuR6C2yACdN6GvJI9LmPptnr80C4XKH56j6k/94iC/fPG0kybQ im6aGSLxQh6uBYqXTxJKmmQtRqO8SNfiSh6xLxyxsSS+Y7jxYXFmHtdhWCrU9c+Sc00p W9FtU3qCKZbP2L0M0GkrqGc/FbJz1XZS7jznZjLfueLvgrKQXi7ddoxlFerWoiEO+W+q DfJhkweC42W6z6eNGN2qZwp5lJpNmhsqJ75Hd7D3hBRDCrDZ1b1Q+6hiHfZese3VHmAl BY8rszViXilMVzRnQ/t8CSYNGgOKTl4kpYoT+Usp9L0nF0fComXmwOQt2Rj0w2+Sduwf eT0Q== X-Gm-Message-State: AOAM533VpJkhagUH9xAj/OKI/SxuLha4CIW8r+BTobfJMbVOCANbwcPT 6W5KizBWCro6mrguGc04n14= X-Received: by 2002:a17:907:2bf6:b0:6b9:725e:4e1f with SMTP id gv54-20020a1709072bf600b006b9725e4e1fmr2943906ejc.527.1645115256153; Thu, 17 Feb 2022 08:27:36 -0800 (PST) Received: from poker.lan (static.2-229-210-222.ip198.fastwebnet.it. [2.229.210.222]) by smtp.gmail.com with ESMTPSA id j13sm3653742edw.24.2022.02.17.08.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 08:27:35 -0800 (PST) From: Andrea Merello To: jic23@kernel.org, mchehab+huawei@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: lars@metafoo.de, robh+dt@kernel.org, andy.shevchenko@gmail.com, matt.ranostay@konsulko.com, ardeleanalex@gmail.com, jacopo@jmondi.org, Andrea Merello , Andrea Merello Subject: [v3 13/13] docs: iio: add documentation for BNO055 driver Date: Thu, 17 Feb 2022 17:27:10 +0100 Message-Id: <20220217162710.33615-14-andrea.merello@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217162710.33615-1-andrea.merello@gmail.com> References: <20220217162710.33615-1-andrea.merello@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Andrea Merello --- Documentation/iio/bno055.rst | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 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..4bb185075325 --- /dev/null +++ b/Documentation/iio/bno055.rst @@ -0,0 +1,53 @@ +.. 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). + +IIO attributes for unavailable measurements (e.g. Euler angles when fusion +mode is disabled) just read zero. + +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. -- 2.17.1