Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dmitry Rokosov and committed by
Jonathan Cameron
d2a4cbcb 682ca76b

+3
+3
include/linux/units.h
··· 20 20 #define PICO 1000000000000ULL 21 21 #define FEMTO 1000000000000000ULL 22 22 23 + #define NANOHZ_PER_HZ 1000000000UL 24 + #define MICROHZ_PER_HZ 1000000UL 25 + #define MILLIHZ_PER_HZ 1000UL 23 26 #define HZ_PER_KHZ 1000UL 24 27 #define KHZ_PER_MHZ 1000UL 25 28 #define HZ_PER_MHZ 1000000UL