From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 41083C4332F for ; Mon, 20 Sep 2021 17:21:57 +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 0E3C761A55 for ; Mon, 20 Sep 2021 17:21:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E3C761A55 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]:48592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSMzL-00009g-4k for qemu-devel@archiver.kernel.org; Mon, 20 Sep 2021 13:21:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSMxX-0006kV-0P for qemu-devel@nongnu.org; Mon, 20 Sep 2021 13:20:03 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSMxV-0008OZ-Fz for qemu-devel@nongnu.org; Mon, 20 Sep 2021 13:20:02 -0400 Received: by mail-wr1-x42f.google.com with SMTP id t8so24825122wri.1 for ; Mon, 20 Sep 2021 10:20:01 -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=7Dgn1Mtpl/Q3FdZkU0MV91QmrjSZHoaCb2A7V8u5OHY=; b=JckAZK/46vdfF+U5UWjK4YiFf7F66BLahrbLJOASA5zQ91xB9uaX2SOhg4tKklRU6h RK0naXwifda1ff2mSbR9Z19pES2hTi4OZhBMiizbPuiPwYDD+M11UuihPkhl0Xv+kISs 97yxgfhUffbZcPE4uiSvRTkshQBX1NQyq7/zreVf+ue+NoOz/ftR9YvigRmdRP9WxpXS 4Reqwpy6dzFcBg7jbElsRy4bswcjxFWr1r571WvD+DI40L1fC/yk3F31KKCHovyx34nX QOkgEewSuYQ8Cr4rs0lzjHFQOL9QkKxrnQvD83mClomYuxSF31J1bfIiZA6CxR6lAT86 NCxg== 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=7Dgn1Mtpl/Q3FdZkU0MV91QmrjSZHoaCb2A7V8u5OHY=; b=jNHxzIczZOdfzQEKp/BAYGIUPJ4Hehd1kuy+feT7ApH6lr3voIhjKowr6SsbpUHUxx rDrTg3Li95kFqfJbnOLjq2cdb7SWWAizas/mzSrXPkDsF7ZVy7MLv6poSdJiHrzlFzb6 Y3QzXQ9h+6WBQhjDXxO/DVIaliLABMrdnoZ9gtmQB9V/H43BY27wutM4x1/dIoJH6WmM pBe/qlseXJJhMpwXbjmMK+DfRZeJW6r8e2N4NmRU9aJZKICr46g2LtafBZQoqHWeCBvz UeGg69dgEM3jQyQh17tk0IjUY+CvzFrQPbqZ4dJApakJ2qIDja0uyBaVLgrsH0LejfIM 1PTA== X-Gm-Message-State: AOAM533H4naFedWhX0cZUGf+nHj+qIZ4x7neFeyZUXUp8jtEp7vWOEOI 2yXVfzZPDCrsSSKlfnKOZXI+A7ZoyGURwqX5UUZMwA== X-Google-Smtp-Source: ABdhPJyWiWaML944VV6tpMyvYOvzwuabtwZOuP29S2GPnzWeCpB2XXlfMBT1MCgOgKJn3X3D6wtxt6LT26L9hOAQLDw= X-Received: by 2002:adf:f185:: with SMTP id h5mr30381698wro.302.1632158399848; Mon, 20 Sep 2021 10:19:59 -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: Peter Maydell Date: Mon, 20 Sep 2021 18:19:07 +0100 Message-ID: Subject: Re: [PATCH v2] hw/sensor: Add lsm303dlhc magnetometer device To: Kevin Townsend Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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, 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" On Mon, 20 Sept 2021 at 17:49, Kevin Townsend wrote: > > 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. The thing is that the starting point is also the finishing point: once we have released something that uses a particular set of units, we can't change it in future without breaking backwards compatibility. So we need to get it right now. -- PMM