summaryrefslogtreecommitdiff
path: root/include/linux/units.h
diff options
context:
space:
mode:
authorDmitry Rokosov <DDRokosov@sberdevices.ru>2022-08-12 16:52:26 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-08-28 16:52:28 +0100
commitd2a4cbcb8bdc0e3d1cf85bf47a670695da0bc27a (patch)
tree600c735f6cb602bd7b2a6c326b4f1b67d233899b /include/linux/units.h
parent682ca76bc60ab86824cca1b34bc865bd0094ac7e (diff)
units: complement the set of Hz units
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 <ddrokosov@sberdevices.ru> Link: https://lore.kernel.org/r/20220812165243.22177-3-ddrokosov@sberdevices.ru Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/units.h')
-rw-r--r--include/linux/units.h3
1 files changed, 3 insertions, 0 deletions
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
+#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