[PATCH v1 1/7] units: Add HZ_PER_GHZ

Andy Shevchenko posted 7 patches 3 weeks, 5 days ago
[PATCH v1 1/7] units: Add HZ_PER_GHZ
Posted by Andy Shevchenko 3 weeks, 5 days ago
The is going to be a new user of the HZ_PER_GHZ definition besides
possibly existing ones. Add that one to the header.

While at it, split Hz and kHz groups of the multipliers for better
maintenance and readability.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/units.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/units.h b/include/linux/units.h
index 00e15de33eca..0c296a004e89 100644
--- a/include/linux/units.h
+++ b/include/linux/units.h
@@ -25,9 +25,12 @@
 #define MICROHZ_PER_HZ		1000000UL
 #define MILLIHZ_PER_HZ		1000UL
 
+/* Hz based multipliers */
 #define HZ_PER_KHZ		1000UL
 #define HZ_PER_MHZ		1000000UL
+#define HZ_PER_GHZ		1000000000UL
 
+/* kHz based multipliers */
 #define KHZ_PER_MHZ		1000UL
 #define KHZ_PER_GHZ		1000000UL
 
-- 
2.50.1
Re: [PATCH v1 1/7] units: Add HZ_PER_GHZ
Posted by Andi Shyti 3 weeks, 4 days ago
Hi Andy,

On Mon, Jan 12, 2026 at 02:46:09PM +0100, Andy Shevchenko wrote:
> The is going to be a new user of the HZ_PER_GHZ definition besides
> possibly existing ones. Add that one to the header.
> 
> While at it, split Hz and kHz groups of the multipliers for better
> maintenance and readability.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>

I'm taking this via i2c if no one is against.

Andi
Re: [PATCH v1 1/7] units: Add HZ_PER_GHZ
Posted by Linus Walleij 3 weeks, 5 days ago
On Mon, Jan 12, 2026 at 2:49 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The is going to be a new user of the HZ_PER_GHZ definition besides
> possibly existing ones. Add that one to the header.
>
> While at it, split Hz and kHz groups of the multipliers for better
> maintenance and readability.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

This looks right to me:
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij