i2c: atr: add static flag
authorCosmin Tanislav <demonsingur@gmail.com>
Wed, 7 May 2025 12:19:13 +0000 (15:19 +0300)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 22 May 2025 09:07:05 +0000 (11:07 +0200)
commit18355307dc56c198365c6b6b359a4a24db013685
tree03ff08b9c47996b018a82b3d397fc3040fdd5a29
parentb09d8a9cce2664cdcef91f10eed9557321ce4a81
i2c: atr: add static flag

Some I2C ATRs do not support dynamic remapping, only static mapping
of direct children.

Mappings will only be added or removed as a result of devices being
added or removed from a child bus.

The ATR pool will have to be big enough to accommodate all devices
expected to be added to the child buses.

Add a new flag that prevents old mappings to be replaced or new mappings
to be created in the alias finding code paths. That mens adding a flags
parameter to i2c_atr_new() and an i2c_atr_flags enum.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-atr.c
drivers/media/i2c/ds90ub960.c
drivers/misc/ti_fpc202.c
include/linux/i2c-atr.h