diff options
author | Corey Minyard <cminyard@mvista.com> | 2018-03-01 11:05:45 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-03-01 11:05:45 +0000 |
commit | aa88d7ad28eafaa7ac187d5bbb0c46f987fac3a4 (patch) | |
tree | 71bb9bdb8d8a50567d59f3e012bac12c29fb92fe /hw/i2c/core.c | |
parent | 373b8ac794291c9a20198ac671728dbd74ac3771 (diff) |
i2c: Move the bus class to i2c.h
Some devices need access to it.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-3-linus.walleij@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i2c/core.c')
-rw-r--r-- | hw/i2c/core.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/hw/i2c/core.c b/hw/i2c/core.c index 9a54b61c1d..cfccefca3d 100644 --- a/hw/i2c/core.c +++ b/hw/i2c/core.c @@ -10,30 +10,13 @@ #include "qemu/osdep.h" #include "hw/i2c/i2c.h" -typedef struct I2CNode I2CNode; - -struct I2CNode { - I2CSlave *elt; - QLIST_ENTRY(I2CNode) next; -}; - #define I2C_BROADCAST 0x00 -struct I2CBus { - BusState qbus; - QLIST_HEAD(, I2CNode) current_devs; - uint8_t saved_address; - bool broadcast; -}; - static Property i2c_props[] = { DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0), DEFINE_PROP_END_OF_LIST(), }; -#define TYPE_I2C_BUS "i2c-bus" -#define I2C_BUS(obj) OBJECT_CHECK(I2CBus, (obj), TYPE_I2C_BUS) - static const TypeInfo i2c_bus_info = { .name = TYPE_I2C_BUS, .parent = TYPE_BUS, |