qemu-e2k/hw/i2c
Patrick Venture 513ca82d89 hw/i2c: add match method for device search
At the start of an i2c transaction, the i2c bus searches its list of
children to identify which devices correspond to the address (or
broadcast).  Now the I2CSlave device has a method "match" that
encapsulates the lookup behavior. This allows the behavior to be changed
to support devices, such as i2c muxes.

Tested: A BMC firmware was booted to userspace and i2c devices were
detected.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Message-Id: <20210412194522.664594-3-venture@google.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2021-04-15 07:10:06 -05:00
..
aspeed_i2c.c hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus() 2020-07-16 12:30:54 -05:00
bitbang_i2c.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
core.c hw/i2c: add match method for device search 2021-04-15 07:10:06 -05:00
exynos4210_i2c.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_i2c.c hw: Remove unnecessary DEVICE() cast 2020-05-15 07:08:52 +02:00
Kconfig hw/i2c/Kconfig: Add an entry for the SMBus 2020-07-16 12:30:54 -05:00
meson.build hw/i2c: Implement NPCM7XX SMBus Module Single Mode 2021-02-16 13:49:28 +00:00
microbit_i2c.c microbit_i2c: Fix coredump when dump-vmstate 2020-10-20 16:12:00 +01:00
mpc_i2c.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_smbus.c hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init() 2021-03-05 15:17:34 +00:00
omap_i2c.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pm_smbus.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ppc4xx_i2c.c hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
smbus_eeprom.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
smbus_ich9.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
smbus_master.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
smbus_slave.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
trace-events hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode 2021-02-16 14:12:54 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
versatile_i2c.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00