]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming
authorKane-Chen-AS <kane_chen@aspeedtech.com>
Mon, 12 Jan 2026 08:30:53 +0000 (16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Wed, 4 Feb 2026 07:24:29 +0000 (08:24 +0100)
commit2835794bcd024607fcc6f2afa4ed3ac22bdc588a
tree6732cf754e39536d530318409c36ae73c35482d6
parent7a477dd1742884eb3ee0d02ae4a0b9ad9edf07d4
hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

On some Aspeed-based machines, multiple I2C controllers may exist
across different components, such as the primary SoC and an external
IO expander or co-processor (e.g., AST1700). Using the current static
naming convention results in object name conflicts when multiple
controllers attempt to instantiate buses with the same ID.

This patch introduces a 'bus-label' property for the Aspeed I2C
controller. This allows higher-level layers, such as the SoC realize
function, to provide a unique identifier for the buses. The I2C bus
object name is then constructed using this label (e.g., "ioexp0.0"
instead of the default "aspeed.i2c.bus.0").

This enhancement ensures unique bus identifiers across the system and
resolves naming conflicts in multi-controller configurations.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260112083054.4151945-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/i2c/aspeed_i2c.c
include/hw/i2c/aspeed_i2c.h