Skip to content
Commit 5eb6d356 authored by Defa Li's avatar Defa Li Committed by Alexandre Belloni
Browse files

i3c: master: Improve initialization of numbered I2C adapters



Add logic to initialize I2C adapters with a specific ID if available,
improving device identification and configuration.

For mixed buses, in addition to the i3c alias, an i2c alias can be added to
assign a fixed bus number to the i2c adapter.

This allows an alias node such as:
    aliases {
        i2c2 = &mixed_bus_a,
        i3c2 = &mixed_bus_a,
        i3c4 = &mixed_bus_b,
    };

    /* assigned "i3c-2" and "i2c-2" */
    mixed_bus_a: i3c-master {
    };

If there is no i2c alias for a mixed bus, the i2c adapter numbers will
remain as is and will be assigned starting after the highest fixed bus
number.

    /* assigned "i3c-4" and likely assigned "i2c-3" */
    mixed_bus_b: i3c-master {
    };

Signed-off-by: default avatarDefa Li <defa.li@mediatek.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20241212091818.8591-1-defa.li@mediatek.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent b266e0d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment