Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2021512rwb; Fri, 12 Aug 2022 10:28:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/qMM2h/OEyJZ1qUpotsrF3iQg04Qf4/uu5HaEBLwrDvkUCsz+fmfuemNWz8U8pM0hvgSe X-Received: by 2002:a17:907:7f0b:b0:731:b81a:1912 with SMTP id qf11-20020a1709077f0b00b00731b81a1912mr3376604ejc.8.1660325287728; Fri, 12 Aug 2022 10:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660325287; cv=none; d=google.com; s=arc-20160816; b=iC/i05d0iOiilqI5MHpgyKvOPCzqFW6SpRS5yBj3DzbWIhkDfdouWt2F1/wnArlxVa C4CbLg84G9tuTsZWzGECusuP0qYWTQu9OXQblfabExeKAeG1U6zbsCPixUDd6mBKbKtO lZIPFANeokHyvYAWppqy2KmxUHMBlUBJPjXGHzbLPlE34iGVQvGfaCZlfaAh8NJhTDkm jBG+OCWWGnIkWm6tMYfd7e1YdjIm5YfHAh2RXiwW0wJmHAFwfFwElDoKWhUCyrvNu9hK Pc5o6VoQdKVDT6BX3gU6dJZX+FzvBarLzIAlrShDeQI6Sucp8Sh4IKrrDQ8ibmoEd19I cxSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=bBzOl1ozVTghtx6a1x8+yHWmy394M9SjIp1tfXubAc0=; b=F/JBlRCG8Isoitam3wGbZJk/bQCMAAZCnN7yRZSLIKWYCNVVtR7nGGJoegPXjblBZn aC/gsEL+ob5c/8veiLALnwk2DpMpq6FAjIFTmCA5hc+DkcZ6YrZNno3M5JcKKvx8fxn5 qE60MflIHzPs+VZ5hzHwfmuQgEbiLFkGGDnZWjTYDGsoQRwYriDkXf2HFiHpIXwldSH3 ExrKLcIY4ntzCGk7b34q28KeB7FH0PLqaV9+7x9KcIy9zQh+i+TpBtjGWACyCKnFeWcj 1h3GpH0yb3qlSdLHh2y275QKlHf6jW3nwG3BcCFtEKLA1DMlJxi9Xi5G8F9FQBwlLq7k 2R+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=bsRIUY5V; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb3-20020a170907960300b0073074f58530si2492404ejc.877.2022.08.12.10.27.41; Fri, 12 Aug 2022 10:28:07 -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=@sberdevices.ru header.s=mail header.b=bsRIUY5V; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239416AbiHLQxP (ORCPT + 99 others); Fri, 12 Aug 2022 12:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239396AbiHLQxF (ORCPT ); Fri, 12 Aug 2022 12:53:05 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9C83ACA0E; Fri, 12 Aug 2022 09:52:58 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id B96655FD09; Fri, 12 Aug 2022 19:52:55 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1660323175; bh=bBzOl1ozVTghtx6a1x8+yHWmy394M9SjIp1tfXubAc0=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=bsRIUY5V9mKHcl6TvhnxrkHLjXbYBiGSNaM8v3QYUrJhtEk+fGOLOw7kRWodYcMLX eMQ0e5jWmHYMv7Ou4fE85YoyOHW1qoKpugmwnOISJEETAl+yjaSO4hXbm7xA7WuiNG 1sUE4ky8GOcEoDMf2r6mBzPazOzzItqcCAblcyjEMrY6wfMflaM6O7MGQxoNKJHDLl mjHZajna10f6H7KJQ7Dtsobdsa69aHI6+3ltRJ2oTeRX2In9qbXTibl6OvEBL49R/R Rh70SG8ql4deMwtdFoW9fN3s+NA8JJ6B4WbwNgo3gNJiA8oyofCd8URG9vOP49xHxP L/qrQ5Zwhh9sA== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Fri, 12 Aug 2022 19:52:55 +0300 (MSK) From: Dmitry Rokosov To: "akpm@linux-foundation.org" , "jic23@kernel.org" , "robh+dt@kernel.org" , "andriy.shevchenko@linux.intel.com" , "andy.shevchenko@gmail.com" , "christophe.jaillet@wanadoo.fr" , "stano.jakubek@gmail.com" , "shawnguo@kernel.org" , "stephan@gerhold.net" , "daniel.lezcano@linaro.org" , "wsa@kernel.org" , "lars@metafoo.de" , "Michael.Hennerich@analog.com" , "jbhayana@google.com" , "lucas.demarchi@intel.com" , "jani.nikula@intel.com" , "linus.walleij@linaro.org" CC: "linux-iio@vger.kernel.org" , kernel , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Dmitry Rokosov Subject: [PATCH v5 2/7] units: complement the set of Hz units Thread-Topic: [PATCH v5 2/7] units: complement the set of Hz units Thread-Index: AQHYrmvmE6n+ZChG30GdF46x+XWXgw== Date: Fri, 12 Aug 2022 16:52:26 +0000 Message-ID: <20220812165243.22177-3-ddrokosov@sberdevices.ru> References: <20220812165243.22177-1-ddrokosov@sberdevices.ru> In-Reply-To: <20220812165243.22177-1-ddrokosov@sberdevices.ru> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/08/12 13:28:00 #20103614 X-KSMG-AntiVirus-Status: Clean, skipped 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 Currently, Hz units do not have milli, micro and nano Hz coefficients. Some drivers (IIO especially) use their analogues to calculate appropriate Hz values. This patch includes them to units.h definitions, so they can be used from different kernel places. Signed-off-by: Dmitry Rokosov --- include/linux/units.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/units.h b/include/linux/units.h index 681fc652e3d7..2793a41e73a2 100644 --- a/include/linux/units.h +++ b/include/linux/units.h @@ -20,6 +20,9 @@ #define PICO 1000000000000ULL #define FEMTO 1000000000000000ULL =20 +#define NANOHZ_PER_HZ 1000000000UL +#define MICROHZ_PER_HZ 1000000UL +#define MILLIHZ_PER_HZ 1000UL #define HZ_PER_KHZ 1000UL #define KHZ_PER_MHZ 1000UL #define HZ_PER_MHZ 1000000UL --=20 2.36.0