public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/9] i2c: atr: allow usage of nested ATRs
@ 2025-02-25 11:39 Cosmin Tanislav
  2025-02-25 11:39 ` [PATCH v2 1/9] i2c: atr: Fix lockdep for " Cosmin Tanislav
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Cosmin Tanislav @ 2025-02-25 11:39 UTC (permalink / raw)
  Cc: Romain Gantois, Tomi Valkeinen, Luca Ceresoli, Wolfram Sang,
	linux-i2c, linux-kernel, Cosmin Tanislav

For upcoming GMSL drivers, we need to be able to use nested ATRs.
The deserializer changes the address of the serializers, and can only
do that for the serializers, while the serializers have proper address
translation hardware, and can translate the address of its children.

To achieve this, add a static flag and a passthrough flag.
The static flag prevents usage of dynamic remapping by disallowing
creation of new mappings outside of the attach_addr() function.
The passthrough flag prevents messages coming from non-direct children
(which don't have a local mapping) to be treated as erroneous.

This series also contains various fixes to the logic observed during
development.

This series depends on:
https://lore.kernel.org/lkml/20250204-fpc202-v7-0-78b4b8a35cf1@bootlin.com

The previous version is at:
https://lore.kernel.org/all/20250203121629.2027871-1-demonsingur@gmail.com

V2:
 * rename and split up i2c_atr_find_mapping_by_addr() to allow for
   usage of parts of its logic where applicable

Cosmin Tanislav (8):
  i2c: atr: unlock mutex after c2a access
  i2c: atr: find_mapping() -> get_mapping()
  i2c: atr: split up i2c_atr_get_mapping_by_addr()
  i2c: atr: do not create mapping in detach_addr()
  i2c: atr: deduplicate logic in attach_addr()
  i2c: atr: allow replacing mappings in attach_addr()
  i2c: atr: add static flag
  i2c: atr: add passthrough flag

Tomi Valkeinen (1):
  i2c: atr: Fix lockdep for nested ATRs

 drivers/i2c/i2c-atr.c   | 187 ++++++++++++++++++++++++++--------------
 include/linux/i2c-atr.h |  22 ++++-
 2 files changed, 142 insertions(+), 67 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-02-28 12:22 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 11:39 [PATCH v2 0/9] i2c: atr: allow usage of nested ATRs Cosmin Tanislav
2025-02-25 11:39 ` [PATCH v2 1/9] i2c: atr: Fix lockdep for " Cosmin Tanislav
2025-02-25 11:39 ` [PATCH v2 2/9] i2c: atr: unlock mutex after c2a access Cosmin Tanislav
2025-02-27 10:43   ` Romain Gantois
2025-02-25 11:39 ` [PATCH v2 3/9] i2c: atr: find_mapping() -> get_mapping() Cosmin Tanislav
2025-02-27 13:25   ` Romain Gantois
2025-02-25 11:39 ` [PATCH v2 4/9] i2c: atr: split up i2c_atr_get_mapping_by_addr() Cosmin Tanislav
2025-02-27 13:29   ` Romain Gantois
2025-02-27 13:43   ` Romain Gantois
2025-02-25 11:39 ` [PATCH v2 5/9] i2c: atr: do not create mapping in detach_addr() Cosmin Tanislav
2025-02-27 13:33   ` Romain Gantois
2025-02-25 11:39 ` [PATCH v2 6/9] i2c: atr: deduplicate logic in attach_addr() Cosmin Tanislav
2025-02-27 13:36   ` Romain Gantois
2025-02-28 12:22     ` Cosmin Tanislav
2025-02-25 11:39 ` [PATCH v2 7/9] i2c: atr: allow replacing mappings " Cosmin Tanislav
2025-02-25 11:39 ` [PATCH v2 8/9] i2c: atr: add static flag Cosmin Tanislav
2025-02-27 13:58   ` Romain Gantois
2025-02-25 11:39 ` [PATCH v2 9/9] i2c: atr: add passthrough flag Cosmin Tanislav
2025-02-27 14:03   ` Romain Gantois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox