Re: [RFC,v2 2/6] i2c: add I2C Address Translator (ATR) support

Wolfram Sang
2019-09-10T18:47:00Z

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

> I still have to examine in depth all of the problems in the i2c-mux
> documented in Documentation/i2c/i2c-topology (thanks for having written
> those docs!), but at first sight it looks like the ATR is not going to
> introduce big problems because of how it works.

Assuming we are using the previously discussed NEEDS_ATR flag for the adapter
instead of the attach/detach callbacks:

Can't we then simply understand an ATR as a generic 1:1 mapping device
which can be setup when registering an adapter?

When we add an adapter using i2c_add_adapter, we have:

.-----. Slave X @ 0x10
.-----. | | |
| CPU |--A--| ATR |---+---- B
`-----' | |
`-----'

When we use i2c_add_mux_adapter, we have:

Slave X @ 0x10
.-----. .-----. |
.-----. | |---| ATR |---+---- B
| CPU |--A--| MUX | '-----'
`-----' | | .-----.
| |---| ATR |---+---- C
`-----' '-----' |
Slave Y @ 0x10

That way we could keep the topology handling solely to the mux-core.

Am I overlooking something?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]