Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3346318pxj; Mon, 7 Jun 2021 08:26:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf9x8nlbmZWnDHBNoERsLtkdWTNqOYAaFpja7e6JhrG9LAqdssTFT9zABS7Mo7Z2nVKLD/ X-Received: by 2002:a17:906:2f0d:: with SMTP id v13mr18299292eji.321.1623079587824; Mon, 07 Jun 2021 08:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623079587; cv=none; d=google.com; s=arc-20160816; b=AcarJaoGrad+w/BbtYgOha1x32Yo+12/4sh30mZHJ3hSTbISXHuhLzT/GBh+WXAf6q MnGoyGBRInpP1HyGVz7Tfr5ioMclDn3kO9urap6bWrq+hbmFuxstzNjapCXhPSn3813A OzBFdVq5L5Weq3/jhzWTpCg1Zs2Dnt2jzYoX4puhNnH+Tt/dlePA0TfqyUVUX70z908k d36Y1+3uVGmh0OvayBG/XGbgBd9eWw5J2xdOBFhZVNrU1fZyBPtk3Q5uGKG8ryospC8z g28xDdxAp3ti4Wbbl81jglW4NPGLYqaXZTiBYW3zOVCDTjLkc2mpvjshPO1Ajms7WGe0 L+GA== 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=Vg3rh6IbM/LfkCkJX5r24Na8ZQHUy/iwOUQTujISNBQ=; b=WhYcyzYGgWGleuQxHpqGJpj/2cRfl61rYlrGvQ38ZMXIcKLEvTAnofQqLSm5RBgCmJ saxpKGyf8PltNN2p5EDg9U+dtbjiBMol7W0LPKJ2vvsAnwOIiBj73QahOOkt7O3vHQ4p rGsJuW8yT0Q2OGmNnlTrSj2bTufzF2tH43kqHMPFxqOvsypAvXZdUJflg8ERXMkGtr9m cJwT0RkuRwRh9OGGFADY5Bfh9yeBRJ8b1k4t53aIPKpIQrXb2r2495SD1MdqKlg5zvhW MybbWe1m6SPdV/LKjk8fB1l7cw5zhoWNuAlbNyQI7+zTShdvB0gJnfIeOtDTGEW1btBF vy/w== 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 cr15si307711ejc.258.2021.06.07.08.26.04; Mon, 07 Jun 2021 08:26:27 -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 S230479AbhFGPZ0 (ORCPT + 99 others); Mon, 7 Jun 2021 11:25:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:24482 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230434AbhFGPZU (ORCPT ); Mon, 7 Jun 2021 11:25:20 -0400 IronPort-SDR: ju35xT6NFlNRrbETWmzp5lhx+Gm7bkLsL3WlSyZr3XdnoMACQlShHwHVWK55w7Sg8b8uECThq+ S+k3kYw40/EA== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204611124" X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="204611124" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 08:23:28 -0700 IronPort-SDR: VPYcu9LpLjRaNJp498khsubMmaiFY1UWv/nJ1JiEAOhpmjiGHfkmTkdjoh/mHNQuBXg3oYgisY t1Q1HBvw7rOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="469122169" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 07 Jun 2021 08:23:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DC2C7C5; Mon, 7 Jun 2021 18:23:48 +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 v2 1/3] units: Add SI metric prefix definitions Date: Mon, 7 Jun 2021 18:23:42 +0300 Message-Id: <20210607152344.57458-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 --- v2: no changes 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