[PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ

Andy Shevchenko posted 7 patches 3 weeks, 5 days ago
drivers/i2c/busses/i2c-mlxbf.c     |  5 ++---
drivers/i2c/busses/i2c-mt65xx.c    | 11 ++++++-----
drivers/i2c/busses/i2c-nomadik.c   |  7 ++++---
drivers/i2c/busses/i2c-rk3x.c      | 12 ++++++------
drivers/i2c/busses/i2c-st.c        |  3 ++-
drivers/i2c/busses/i2c-synquacer.c |  3 ++-
include/linux/units.h              |  3 +++
7 files changed, 25 insertions(+), 19 deletions(-)
[PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ
Posted by Andy Shevchenko 3 weeks, 5 days ago
A few drivers for I²C host controllers use HZ_PER_GHZ in numeric form.
This is less readable and prone to subtle mistakes. Instead, introduce
a well defined constant and use it in the drivers. No functional change
implied except one case where 64-bit division replaced with 32-bit one.

Andy Shevchenko (7):
  units: Add HZ_PER_GHZ
  i2c: mlxbf: Use HZ_PER_GHZ constant instead of custom one
  i2c: mt65xx: Use HZ_PER_GHZ constant instead of plain number
  i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number
  i2c: rk3x: Use HZ_PER_GHZ constant instead of plain number
  i2c: st: Use HZ_PER_GHZ constant instead of plain number
  i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number

 drivers/i2c/busses/i2c-mlxbf.c     |  5 ++---
 drivers/i2c/busses/i2c-mt65xx.c    | 11 ++++++-----
 drivers/i2c/busses/i2c-nomadik.c   |  7 ++++---
 drivers/i2c/busses/i2c-rk3x.c      | 12 ++++++------
 drivers/i2c/busses/i2c-st.c        |  3 ++-
 drivers/i2c/busses/i2c-synquacer.c |  3 ++-
 include/linux/units.h              |  3 +++
 7 files changed, 25 insertions(+), 19 deletions(-)

-- 
2.50.1

Re: [PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ
Posted by Wolfram Sang 3 weeks, 3 days ago
On Mon, Jan 12, 2026 at 02:46:08PM +0100, Andy Shevchenko wrote:
> A few drivers for I²C host controllers use HZ_PER_GHZ in numeric form.
> This is less readable and prone to subtle mistakes. Instead, introduce
> a well defined constant and use it in the drivers. No functional change
> implied except one case where 64-bit division replaced with 32-bit one.
> 
> Andy Shevchenko (7):
>   units: Add HZ_PER_GHZ
>   i2c: mlxbf: Use HZ_PER_GHZ constant instead of custom one
>   i2c: mt65xx: Use HZ_PER_GHZ constant instead of plain number
>   i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number
>   i2c: rk3x: Use HZ_PER_GHZ constant instead of plain number
>   i2c: st: Use HZ_PER_GHZ constant instead of plain number
>   i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number
> 

Fine with me:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Re: [PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ
Posted by AngeloGioacchino Del Regno 3 weeks, 4 days ago
Il 12/01/26 14:46, Andy Shevchenko ha scritto:
> A few drivers for I²C host controllers use HZ_PER_GHZ in numeric form.
> This is less readable and prone to subtle mistakes. Instead, introduce
> a well defined constant and use it in the drivers. No functional change
> implied except one case where 64-bit division replaced with 32-bit one.
> 
> Andy Shevchenko (7):
>    units: Add HZ_PER_GHZ
>    i2c: mlxbf: Use HZ_PER_GHZ constant instead of custom one
>    i2c: mt65xx: Use HZ_PER_GHZ constant instead of plain number
>    i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number
>    i2c: rk3x: Use HZ_PER_GHZ constant instead of plain number
>    i2c: st: Use HZ_PER_GHZ constant instead of plain number
>    i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number
> 
>   drivers/i2c/busses/i2c-mlxbf.c     |  5 ++---
>   drivers/i2c/busses/i2c-mt65xx.c    | 11 ++++++-----
>   drivers/i2c/busses/i2c-nomadik.c   |  7 ++++---
>   drivers/i2c/busses/i2c-rk3x.c      | 12 ++++++------
>   drivers/i2c/busses/i2c-st.c        |  3 ++-
>   drivers/i2c/busses/i2c-synquacer.c |  3 ++-
>   include/linux/units.h              |  3 +++
>   7 files changed, 25 insertions(+), 19 deletions(-)
> 

Whole series is

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Re: [PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ
Posted by Andi Shyti 3 weeks, 3 days ago
Hi Andy,

> Andy Shevchenko (7):
>   units: Add HZ_PER_GHZ
>   i2c: mlxbf: Use HZ_PER_GHZ constant instead of custom one
>   i2c: mt65xx: Use HZ_PER_GHZ constant instead of plain number
>   i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number
>   i2c: rk3x: Use HZ_PER_GHZ constant instead of plain number
>   i2c: st: Use HZ_PER_GHZ constant instead of plain number
>   i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number

merged to i2c/i2c-host.

Thanks,
Andi
Re: [PATCH v1 0/7] i2c: busses: Introduce and use HZ_PER_GHZ
Posted by Andy Shevchenko 3 weeks, 3 days ago
On Wed, Jan 14, 2026 at 08:36:09AM +0100, Andi Shyti wrote:
> > Andy Shevchenko (7):
> >   units: Add HZ_PER_GHZ
> >   i2c: mlxbf: Use HZ_PER_GHZ constant instead of custom one
> >   i2c: mt65xx: Use HZ_PER_GHZ constant instead of plain number
> >   i2c: nomadik: Use HZ_PER_GHZ constant instead of plain number
> >   i2c: rk3x: Use HZ_PER_GHZ constant instead of plain number
> >   i2c: st: Use HZ_PER_GHZ constant instead of plain number
> >   i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number
> 
> merged to i2c/i2c-host.

Thank you!

-- 
With Best Regards,
Andy Shevchenko