i2c: support per-channel ATR alias pools
authorRomain Gantois <romain.gantois@bootlin.com>
Thu, 6 Mar 2025 16:23:28 +0000 (17:23 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 18 Apr 2025 21:34:19 +0000 (23:34 +0200)
commit328a106ce0e8d0596d2b020b6f83efd0c859b084
tree242d7c5a6bbcba1e6c3c5a7e9f66c2a1a3d64fcd
parentdb1962c94dab207e5db5eeb7fdaa8e5f9c60d00e
i2c: support per-channel ATR alias pools

Some I2C address translators (ATRs) assign each of their remote peripheral
aliases to a specific channel. To properly handle these devices, add
support for having separate alias pools for each ATR channel.

This is achieved by allowing callers of i2c_atr_add_adapter to pass an
optional alias list. If present, this list will be used to populate the
channel's alias pool. Otherwise, the common alias pool will be used.

Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-atr.c
drivers/media/i2c/ds90ub913.c
drivers/media/i2c/ds90ub953.c
include/linux/i2c-atr.h