aboutsummaryrefslogtreecommitdiff
path: root/include/linux/i2c-atr.h
AgeCommit message (Collapse)AuthorFilesLines
2023-07-14media: i2c: add I2C Address Translator (ATR) supportLuca Ceresoli1-0/+116
An ATR is a device that looks similar to an i2c-mux: it has an I2C slave "upstream" port and N master "downstream" ports, and forwards transactions from upstream to the appropriate downstream port. But it is different in that the forwarded transaction has a different slave address. The address used on the upstream bus is called the "alias" and is (potentially) different from the physical slave address of the downstream chip. Add a helper file (just like i2c-mux.c for a mux or switch) to allow implementing ATR features in a device driver. The helper takes care of adapter creation/destruction and translates addresses at each transaction. Signed-off-by: Luca Ceresoli <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>