[PATCH v2 00/10] i2c: busses: Introduce and use i2c_10bit_addr_*_from_msg()

Andy Shevchenko
2025-02-13T14:10:54Z

For 8-bit addresses we have a helper function, define similar ones
for 10-bit addresses and use it in the drivers. It allows to remove
some boilerplate code.

Fabrizio, I haven't collected your tags as code changed more than 50%, however
semantically the parts you reviewed stay the same.

In v2:
- introduced hi/lo helpers (Geert)
- rewrote series based on the above
- added a couple of new converted drivers

v1: https://lore.kernel.org/r/20250212163359.2407327-1-andriy.shevchenko@linux.intel.com

Andy Shevchenko (10):
i2c: Introduce i2c_10bit_addr_*_from_msg() helpers
i2c: axxia: Use i2c_10bit_addr_*_from_msg() helpers
i2c: bcm-kona: Use i2c_10bit_addr_*_from_msg() helpers
i2c: brcmstb: Use i2c_10bit_addr_*_from_msg() helpers
i2c: eg20t: Use i2c_10bit_addr_*_from_msg() helpers
i2c: kempld: Use i2c_10bit_addr_*_from_msg() helpers
i2c: mt7621: Use i2c_10bit_addr_*_from_msg() helpers
i2c: rzv2m: Use i2c_10bit_addr_*_from_msg() helpers
i2c: ibm_iic: Use i2c_*bit_addr*_from_msg() helpers
i2c: mv64xxx: Use i2c_*bit_addr*_from_msg() helpers

drivers/i2c/busses/i2c-axxia.c | 21 +++------------------
drivers/i2c/busses/i2c-bcm-kona.c | 6 +++---
drivers/i2c/busses/i2c-brcmstb.c | 11 +++++------
drivers/i2c/busses/i2c-eg20t.c | 28 +++++-----------------------
drivers/i2c/busses/i2c-ibm_iic.c | 14 ++++++--------
drivers/i2c/busses/i2c-kempld.c | 10 +++++-----
drivers/i2c/busses/i2c-mt7621.c | 20 ++++++++------------
drivers/i2c/busses/i2c-mv64xxx.c | 12 +++---------
drivers/i2c/busses/i2c-rzv2m.c | 15 +++++----------
include/linux/i2c.h | 14 ++++++++++++++
10 files changed, 57 insertions(+), 94 deletions(-)

--
2.45.1.3035.g276e886db78b