Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp36748lfe; Fri, 15 Apr 2022 18:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx61X+wxCleUxe+E6H+Q/y2iVKpFM1wllg776ir7PvsdMvRbEEdw5kfl/McGFvn2btSaw3V X-Received: by 2002:a63:a804:0:b0:398:e7d7:29ab with SMTP id o4-20020a63a804000000b00398e7d729abmr1226483pgf.138.1650071707975; Fri, 15 Apr 2022 18:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650071707; cv=none; d=google.com; s=arc-20160816; b=w9XaA+l0dAEuHpP+LgIgh141Zyc6iDskBcYfpGwfLi+EzIVqiKfxQGzxcAs12xRm+Y H/HbEYGb6AXNoNlGDyOVNksyloVHlSeZ0A6AI26ReLCzHLKpwC0AKm7cGbArzJTLMpIh gOirIv7IJVd0TtTaSiO+f6e+o68n/t3FZQUPpFCq+y33hriatJEIiJtBKl96wEHhIZno lSC9QK81Mxeh7X5JWanG0LIJXZ8kvnRd7POR8/pXRaP7ZKQzKsDhJVtTemM+uvbtv/tZ f9MOGfPvG2ugsLtY6L15fcV/uqjacDVxHuQX484VdRUW6H3YNDEAy9tjt2iwvUApBayY Q6XQ== 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=1uuQGvfh8vFWU1llTooYRNPk+PjiEO3+SafqMRB+yTM=; b=CGyVHy5Ygw/ruXySx+GfCWHGSPQWRd4zK66NgresFa2bFFTYR2YzZjPoPE1V9DOPfW Dx3uSsryz9sCQhEpWViuF0BoN33vmrFKFd/BSDS3LAoaG3pg6VK2zf8hYw8OUW1xsspH mXdSc+qGJszsogQGkCzTuur8rPyv7/cYcYxvmu8bGkgkxTVv6GwMJ8/ghW6g+S9kUtW/ soV4iZLWZlA94zsydghUdPa2DJ03PUtXj6VdKTvYNoPyssfVjgXmKhlcJrP4uUpyoUmn vfDbqCRg1sgPwGM+13M1IJrtj2+CmqPQX3niK3R/EfDvqAQB6bs33JVRrgNoWtqaCqGC cR/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MmV3Nlng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j7-20020a170903028700b00153b2d16586si2648579plr.398.2022.04.15.18.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MmV3Nlng; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 95DD7131F6D; Fri, 15 Apr 2022 17:51:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353975AbiDONEI (ORCPT + 99 others); Fri, 15 Apr 2022 09:04:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353935AbiDONDI (ORCPT ); Fri, 15 Apr 2022 09:03:08 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAA29366AD; Fri, 15 Apr 2022 06:00:39 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id b15so9851701edn.4; Fri, 15 Apr 2022 06:00:39 -0700 (PDT) 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=1uuQGvfh8vFWU1llTooYRNPk+PjiEO3+SafqMRB+yTM=; b=MmV3Nlngf1Oa8Eqp2bgiBSkaDi4MmYrtIQ7m6mkS7q+rvOtnL6mw0Ed2GcZDynGLng 80khJtznKxUY0/ag2Hn7PnyIofTF0wtDNMzUcVkLuDhs8Ff24ZufppNfbzqMFeMXH2h6 7r+AFUpkur87hKgGrsDlpnFwkbrh6T5x3CbYxxc8RTCiH3yYjPTghw9aOXjhTa1JCm6x 7zBNUFubyB/Rqva4UjoUnQGvCk/oZaP1R8Cr4BoW1Zjn9T7vW/twEcqx/5uXzVNkofru NOgeWNYfXe80bVuBV8PGRC/9+p1ujqCx+YTy79S/HX3Kug1BTcAVuOjRN4KogXXnk6/s eOuA== 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=1uuQGvfh8vFWU1llTooYRNPk+PjiEO3+SafqMRB+yTM=; b=vNuj4T08Y0PeLdw0w5OCy7YExX6lIJyF76VM6ue/zmKt1sFc/ccNWENwNTdRThKVTK z/xaAUUeHRvNuSamPBM1ohRWWoboI+d76GNQjSjnq/fSCCvKgErkWBHqRx3CzCvWOSQ4 WSkA+juQmTC27CBGJAY0V7fw59+wtKUEPFmQypDE1+Qjo1Y9xBNdAMzWOG2OchDCNUCN s6ZyESnujznHbmZKuEqbpPhI7VEZBUHOIcCBmdZ6UOxfMA1n+fdiFgitqRzAc7fjk8rb peDfw1n25QlqGc/ysbzlqNwMwyQNlJQ4Gs8+4YN3UJyBvRyB5/MwXj3TQMw+5zWn8cSX ZtQA== X-Gm-Message-State: AOAM531VuRPAfkksav9ryQ/YYOpm0U545vy+gSTTZgutCxHbB8WoRwVX mLPKUyRTeNZTzpRjjUuuPbM= X-Received: by 2002:a05:6402:238d:b0:41d:7630:2300 with SMTP id j13-20020a056402238d00b0041d76302300mr8172120eda.363.1650027638294; Fri, 15 Apr 2022 06:00:38 -0700 (PDT) Received: from poker.lan (static.2-229-210-222.ip198.fastwebnet.it. [2.229.210.222]) by smtp.gmail.com with ESMTPSA id i26-20020a50d75a000000b0041e84bb406fsm2704715edj.0.2022.04.15.06.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 06:00:37 -0700 (PDT) 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 Subject: [v4 14/14] docs: iio: add documentation for BNO055 driver Date: Fri, 15 Apr 2022 15:00:05 +0200 Message-Id: <20220415130005.85879-15-andrea.merello@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220415130005.85879-1-andrea.merello@gmail.com> References: <20220415130005.85879-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 From: Andrea Merello 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 --- 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