mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hw/i2c: move search to i2c_scan_bus method
Moves the search for matching devices on an i2c bus into a separate method. This allows for an object that owns an I2CBus can avoid duplicating this method. 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-4-venture@google.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
513ca82d89
commit
3f9b32595e
2 changed files with 28 additions and 12 deletions
|
@ -87,6 +87,8 @@ void i2c_nack(I2CBus *bus);
|
|||
int i2c_send_recv(I2CBus *bus, uint8_t *data, bool send);
|
||||
int i2c_send(I2CBus *bus, uint8_t data);
|
||||
uint8_t i2c_recv(I2CBus *bus);
|
||||
bool i2c_scan_bus(I2CBus *bus, uint8_t address, bool broadcast,
|
||||
I2CNodeList *current_devs);
|
||||
|
||||
/**
|
||||
* Create an I2C slave device on the heap.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue