[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251107201005.3156118-3-andriy.shevchenko@linux.intel.com>
Date: Fri, 7 Nov 2025 21:03:00 +0100
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Hans Verkuil <hverkuil+cisco@...nel.org>,
linux-iio@...r.kernel.org,
chrome-platform@...ts.linux.dev,
linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org
Cc: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Daniel W. S. Almeida" <dwlsalmeida@...il.com>
Subject: [PATCH v2 2/6] units: Add 32- and 64-bit signed values of π
There are a few drivers that want to have these values, and
one more known to come soon. Let's define the values for them.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
include/linux/units.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/units.h b/include/linux/units.h
index f626e212d4ca..5b3293bce04c 100644
--- a/include/linux/units.h
+++ b/include/linux/units.h
@@ -21,6 +21,12 @@
#define PICO 1000000000000ULL
#define FEMTO 1000000000000000ULL
+/* Value of π * 10⁸ (fits s32 or signed int) */
+#define PI 314159265
+
+/* Value of π * 10¹⁸ (fits s64 or signed long long) */
+#define PI_LL 3141592653589793238LL
+
/* Hz based multipliers */
#define NANOHZ_PER_HZ 1000000000UL
#define MICROHZ_PER_HZ 1000000UL
--
2.50.1
Powered by blists - more mailing lists