[PATCH v2 2/6] units: Add 32- and 64-bit signed values of π

From: Andy Shevchenko

Date: Fri Nov 07 2025 - 15:10:14 EST


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@xxxxxxxxxxxxxxx>
---
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