Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp388170pxj; Thu, 3 Jun 2021 09:05:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNHQQGKaWwWhw/0YhMZusj0oRLV+iTSqwQnb3b2BVP2uOI8zHfexX7FpnsFrVCwcBtFNDl X-Received: by 2002:a17:906:7052:: with SMTP id r18mr77462ejj.449.1622736338808; Thu, 03 Jun 2021 09:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622736338; cv=none; d=google.com; s=arc-20160816; b=G7LS+GiuOLWxH7Lg3MJdAwCqBtOQiBpNhg1D9BrhQDs5JvuAPwvcJ8FfNMy+VBzqw2 niOHt+t5bIgnphcr5VrUt8Js8kua2JJs7+ZkiXK5oe+qBazTe60jPS25tJVG6bB56XsJ UDyCwbIR45L/D/r+lW4Cgc3SNGsiHafwjfiq4q7UABPwV4YmGR8Bjhz1kDGcnmBjfl0p fGYHtVc2q19hYkXVbpUUwH5vBLJ+lrRJgaPUOg2DSOvl0JBBvfmz4NAtlW3Qw2S6f4lS QmvwKKJ4K4D4eVwP2F/dySk0rG8Ny7gePjje24s9Jzp1PbwwvwnHSVo7qHddRCFxSQ4C /eFA== 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 :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=Iwx30kkNaW0opa6krqrOl5as6aHdXJsFIhRuK+4TRLA=; b=MkZX44m4WaTfHiSiNhgqDpVKvSTe0AwNe1BNmXAiqYVBm/QgzNJvn4pAX4JWswzh5P Nt88Z5v4aJoT89bTAW0MxaSENf7XHVtaTFJzpbBxfWQQlw3LUDDHB2nV7i8DUyklgcJ+ XHCfsSGl+DhOglfDy3oru0IOxQgdOq6G8LOolJ2hGrns2TDzy0yqmtwc++tIQDcRZ89x f9WmqtYYtWb8pNnaUk/yuLrFayLP8c0lW90fMKhCQ7fyGYZ8oWd/+leoKqtOb1nz4T5y fYdMsNxNjsNF7rwuLQJKEhmGMLCaAxECzUHO+YFrdyDSqISpx1uSJ+y958+cCnJo6Ydv qrEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si2596294ejz.127.2021.06.03.09.05.13; Thu, 03 Jun 2021 09:05:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbhFCQGD (ORCPT + 99 others); Thu, 3 Jun 2021 12:06:03 -0400 Received: from mga01.intel.com ([192.55.52.88]:24427 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhFCQGC (ORCPT ); Thu, 3 Jun 2021 12:06:02 -0400 IronPort-SDR: Hu3uCnwLP8abPje/bBNetGMgQdVoH9Rd1HG6fw3msFL4sVFjgN5kMjsPBJ9YtfUT9Wg6+07OJu iOOGcIaX4S7g== X-IronPort-AV: E=McAfee;i="6200,9189,10004"; a="225380206" X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="225380206" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 09:04:17 -0700 IronPort-SDR: Bdh57II8u2TBzL+Zxw3jPrqXkpWE1M40n2kH8+LqN+lstynjdj3yDYQx8hw6pVbum/ZzNmhVwj HIy4nk9sTIkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="483528966" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 03 Jun 2021 09:04:15 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CD9AF269; Thu, 3 Jun 2021 19:04:38 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , Mika Westerberg , wsa@kernel.org Subject: [PATCH resend v1 1/3] units: Add SI metric prefix definitions Date: Thu, 3 Jun 2021 19:04:31 +0300 Message-Id: <20210603160433.35816-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sometimes it's useful to have well-defined SI metric prefix to be used to self-describe the formulas or equations. List most popular ones in the units.h. Signed-off-by: Andy Shevchenko --- include/linux/units.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/linux/units.h b/include/linux/units.h index dcc30a53fa93..7366fcd45ec2 100644 --- a/include/linux/units.h +++ b/include/linux/units.h @@ -4,6 +4,22 @@ #include +/* Metric prefixes in accordance with Système international (d'unités) */ +#define PETA 1000000000000000LL +#define TERA 1000000000000LL +#define GIGA 1000000000L +#define MEGA 1000000L +#define KILO 1000L +#define HECTO 100L +#define DECA 10L +#define DECI 10L +#define CENTI 100L +#define MILLI 1000L +#define MICRO 1000000L +#define NANO 1000000000L +#define PICO 1000000000000LL +#define FEMTO 1000000000000000LL + #define MILLIWATT_PER_WATT 1000L #define MICROWATT_PER_MILLIWATT 1000L #define MICROWATT_PER_WATT 1000000L -- 2.30.2