Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1450935iog; Tue, 14 Jun 2022 06:23:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWMOuV2VpDs1oX6JBk9LEFayakbKjvB8Au5trMfdHRmGysrdjnlL6r8IwzviuvToHiOpx/ X-Received: by 2002:aa7:ce96:0:b0:42d:e1ae:6815 with SMTP id y22-20020aa7ce96000000b0042de1ae6815mr6012132edv.109.1655213038832; Tue, 14 Jun 2022 06:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655213038; cv=none; d=google.com; s=arc-20160816; b=hSXwiTlA1/Zl9FFLjVidHoRdVnZ3bzuPOREnM0j3cy4NSlvGCj5TUwDgV+bLYzP80y +cwrHt0GaCRDI1ut4pJUhY7tlTw4TvApZ9MyC4LMxN1v+2L+K9/t1xjjRDWcZ4yYVN+M q/yImEEMW/nNrJEZWe6tGoiZbM3ZLzyuYMpBOI3iNuzZs20dqdiEjjvbPb6SARSYF5WI PRc/PB2gVqq7iafH9cXlq0O1RpOjC3hA/Ovjykdw/kcm/ATIpvlJRQtSHiUPtIqe4hAf 4stCvl/ckw13WNDNQd/CGHYZe3OVVR1JRfw+rjG6Lxy4crm+sjoRWAQpGoRSYCuFfCd8 WZqA== 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=Or8dfIOR3t70/SRnTgbYYwtDQvsCBKZHlbKm77AmtvI=; b=cRgFsPEVGJGbhl9h9PULDhf4wp9T7A0cmL8wWWdZsNXjUtEWAPD4ddP16Qw/ytJNSJ KfLBsocT7b+LfGwANKkPZEfRipV95TJn4fS1usU3fcPok36z2QoLKaGLq4z17k7xtuGv BAxwbo2vwB6C+rZhUxsXfkHArO0fqlpS2i0KfnOiB0McSlSqw+x+zX2grcFWdvnIhDrl k3i3OyRI85omKW784enjhjBUSNtFtkAPQ3rmHYTMR48B6Lh7YrIRAuOju6xwqeWrkALp rVIaVl9L22HJwRvI9Fyr+3gGJdF6scCNsYwjejzbkAChZzIBiSU5XI7Pa4LAL2tZ7Gg1 oCeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iit.it header.s=mx header.b=BcZOKdZ1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=iit.it Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd2-20020a170907628200b00711ffe66bf4si11493663ejc.873.2022.06.14.06.23.23; Tue, 14 Jun 2022 06:23:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@iit.it header.s=mx header.b=BcZOKdZ1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=iit.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241113AbiFNMfe (ORCPT + 99 others); Tue, 14 Jun 2022 08:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244874AbiFNMfN (ORCPT ); Tue, 14 Jun 2022 08:35:13 -0400 Received: from es400ra01.iit.it (mx.iit.it [90.147.26.161]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 354884D621; Tue, 14 Jun 2022 05:32:08 -0700 (PDT) Received: from es400ra01.iit.it (127.0.0.1) id hl1vse0171sj; Mon, 13 Jun 2022 14:05:57 +0200 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iit.it; s=mx; i=@iit.it; h=Received:Received:From:To:CC:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=Or8dfIOR3t70/SRnTgbYY wtDQvsCBKZHlbKm77AmtvI=; b=BcZOKdZ1/WnnwOHJPDmauAR/bje0erSJkMoQe jUvDvgnBc9ytCx5AX/Q31Svg9Api1Zu7nUZ58TKiuoEX9EU9zhlfIce7ihp1DF8T Y7FPOnEt4mxzgxkiMgWpp0rwc/BotzUGeyckug/u/cG/Std6RnzxbgbiRPuxFBbR KNLdYU= Received: from mail.iit.it ([10.255.8.186]) by es400ra01.iit.it ([172.31.0.241]) (SonicWall 10.0.16.7295) with ESMTPS (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256) id o202206131205570155825-11; Mon, 13 Jun 2022 14:05:57 +0200 Received: from poker.lan (90.147.26.235) by iitmxwge020.iit.local (10.255.8.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.17; Mon, 13 Jun 2022 14:05:57 +0200 From: To: , , , , CC: , , , , , , Andrea Merello Subject: [v6 14/14] docs: iio: add documentation for BNO055 driver Date: Mon, 13 Jun 2022 14:05:34 +0200 Message-ID: <20220613120534.36991-15-andrea.merello@iit.it> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220613120534.36991-1-andrea.merello@iit.it> References: <20220613120534.36991-1-andrea.merello@iit.it> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [90.147.26.235] X-ClientProxiedBy: IITMXWGE021.iit.local (10.255.8.187) To iitmxwge020.iit.local (10.255.8.186) X-Mlf-DSE-Version: 6873 X-Mlf-Rules-Version: s20220519150137; ds20200715013501; di20220610180234; ri20160318003319; fs20220610211824 X-Mlf-Smartnet-Version: 20210917223710 X-Mlf-Envelope-From: Andrea.Merello@iit.it X-Mlf-Version: 10.0.16.7295 X-Mlf-License: BSV_C_AP_T_R X-Mlf-UniqueId: o202206131205570155825 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Reviewed-by: Andy Shevchenko --- 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