Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF72EC4332F for ; Mon, 20 Sep 2021 16:55:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE79C6138B for ; Mon, 20 Sep 2021 16:55:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BE79C6138B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:33858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSMZg-0004XM-Nn for qemu-devel@archiver.kernel.org; Mon, 20 Sep 2021 12:55:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSMUB-0006dJ-Cj for qemu-devel@nongnu.org; Mon, 20 Sep 2021 12:49:43 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:40903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSMU9-0008H9-Mh for qemu-devel@nongnu.org; Mon, 20 Sep 2021 12:49:43 -0400 Received: by mail-wr1-x436.google.com with SMTP id q26so31525657wrc.7 for ; Mon, 20 Sep 2021 09:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z3YoGNY/P5DHE5Iv6RWE30O4HpELox6HgP5mOIKdCVE=; b=FxzoJ/Y2Ln2JQ4HwnYvIWzi3QHU296updVnqSHGjOtl+ACNclQjyTVs5v447AZhNCG +UQN2Ofqma7cWRaqpEkY3vrs+Fsh1dKu/MPI+olnShlFzC+NOtZk+tJG7s7t2KfQWNt5 PY2NDJheNT7CY75FRK51T+dxKMj9Tpf5NVQO66EujsOBNUJTHgZnFOdKftF/Hf86O4HQ +RU1NecqRPx8bnv0LhK6dzY/DORcJListJ5voaSWk55ry19EqNZ4uJ63qASE6tnK9PJJ 7nctQOkjffpcEHk0hymDGmCj1ro3UC+tBuFVio7BKyUqhp7BOSi01mhfYhlcmk9JiJ4J BA/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z3YoGNY/P5DHE5Iv6RWE30O4HpELox6HgP5mOIKdCVE=; b=YEXaLv5NR3Q5OEXUoSZSQvEHKrfytqEWvxicfKMqT7X+IUW7i+QMUTN0kfS4i1DTHA 0SBLp9T8C8+B2ogUs1W++rxpEzas5Ki8Y+K1wrD0gBYMm+m9Z7vJqwyuGiaV45urhMt5 /F6FzIp1oU3BwOtNzl2lDeyDZ3gtU1ZgNSNCG/fGD7MfeF51s1bhKYEVZ/g6lvfqfSEW aTS/RFRTQGb6LGlrD2m7qRe6mjxR0Va0nD6wThtkV/EDJFxGRzBY3OaanyFKNcWJN2Uw IA9dv1YgPlyzB/EtFhO5jwhdIxbIx39HwN9ExaUJ6ogiUZj5bOm0OOM3666ftGkDMr6l a4hw== X-Gm-Message-State: AOAM531or4qhV9QUBanJGe53pzLV/BgoEYKC4FplGmKyrAZKzCZoaxZj +nq5g9cZbIgk/YcEg+cSMtChCm8agrl64Ckipdy+UA== X-Google-Smtp-Source: ABdhPJzjdHXobV+u5e0zTuLsuSipoY2Xb4o4MB/cMupQ6R3IgQOKOkaZWMElwbUQu1XHtNw/mVZ59NwBbNvqO27VwyU= X-Received: by 2002:adf:f8d2:: with SMTP id f18mr29710348wrq.140.1632156579928; Mon, 20 Sep 2021 09:49:39 -0700 (PDT) MIME-Version: 1.0 References: <20210815162738.75461-1-kevin.townsend@linaro.org> <20210815162738.75461-2-kevin.townsend@linaro.org> In-Reply-To: From: Kevin Townsend Date: Mon, 20 Sep 2021 18:49:29 +0200 Message-ID: Subject: Re: [PATCH v2] hw/sensor: Add lsm303dlhc magnetometer device To: Peter Maydell Content-Type: multipart/alternative; boundary="0000000000002a348105cc7011bd" Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=kevin.townsend@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000002a348105cc7011bd Content-Type: text/plain; charset="UTF-8" On Mon, 20 Sept 2021 at 17:14, Peter Maydell wrote: > That's OK -- our "int" properties are int64_t. So we could easily > fit something like 10000 == 1.0000 uT, in case we might want > the extra precision in future. That would be 1,000,000 == 1 G > (assuming I haven't messed up my arithmetic ;-)) > > Is 0.001 uT OK to use as a starting point? I think that's enough for most sensors I'm aware of. Kevin --0000000000002a348105cc7011bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, 20 Sept 2021= at 17:14, Peter Maydell <pe= ter.maydell@linaro.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex"> That's OK -- our "int" properties are int64_t. So we could ea= sily
fit something like 10000 =3D=3D 1.0000 uT, in case we might want
the extra precision in future. That would be 1,000,000 =3D=3D 1 G
(assuming I haven't messed up my arithmetic ;-))

Is 0.001 uT OK to use as a starting point? I think th= at's enough for most
sensors I'm aware of.

=
Kevin
--0000000000002a348105cc7011bd--