Re: [PATCH v4 2/7] units: Add HZ_PER_GHZ definition

Jonathan Cameron
2026-01-16T19:01:13Z

On Fri, 16 Jan 2026 17:26:56 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> +Cc: Andi
>
> On Fri, Jan 16, 2026 at 02:32:21PM +0000, Rodrigo Alencar via B4 Relay wrote:
> >
> > New PLL IIO driver supports output frequency of several GHz.
> > The new define helps to constraint DT properties and frequency
> > calculation parameters.
>
> There is already pending patch to add this in I²C host controller subsystem.
> On one hand the conflict, if any, is easy to resolve (the other patch adds
> a couple of comments). On the other we are at almost rc6 and it seems DT people
> are not happy about something, which would mean that the series most likely
> will miss next merge window.

Linus is planning an rc8 so this 'might' merge this cycle.

https://lore.kernel.org/all/CAHk-=wib+MG0grZgub=SkCpPnNXPFE1nHsDpFQz1sBwOsrV_VQ@mail.gmail.com/

>
> So, the solutions are:
> - do nothing and resolve conflicts, if any
> - define this constant locally in the respective IIO driver and drop it after merge

Do that and shout about it in the patch description. If I merge this next
cycle I can clean up.

> - postpone this series to the next cycle (effectively drop this patch)
> - ask Andi to provide an immutable branch / tag with I²C host patches
> - ask Andi to provide the only that patch in immutable tag / branch, but it
> will require him to rebase his tree
>
> I'm skeptical about last two options on the grounds on how the IIO works and
> possible rebase requirement (which is not good to have).

Not worth it for a single define. I do have a request out for an i3c fix
that effectively the same request, but that's for breakage that otherwise
requires ifdef magic to work around (which I'll still do if no progress
in a few days).

Thanks for highlighting this Andy. Whilst I saw the i2c series, I've
slept since then so might well have forgotten that!

Jonathan

>
> I leave it to you and the respective maintainers to make a final decision.
>
> > diff --git a/include/linux/units.h b/include/linux/units.h
> > index 00e15de33eca..06870e9e90b8 100644
> > --- a/include/linux/units.h
> > +++ b/include/linux/units.h
> > @@ -27,6 +27,7 @@
> >
> > #define HZ_PER_KHZ 1000UL
> > #define HZ_PER_MHZ 1000000UL
> > +#define HZ_PER_GHZ 1000000000UL
> >
> > #define KHZ_PER_MHZ 1000UL
> > #define KHZ_PER_GHZ 1000000UL
>