libqos: i2c: move address into QI2CDevice
commit06599472ec40efef3de7cb2bc98d61e8d4b18a63
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Mar 2019 14:06:50 +0000 (18 15:06 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Jun 2019 12:03:02 +0000 (3 14:03 +0200)
tree284d2baa0ab63e29a7c0e70adca2d80602a7e16e
parent8130dbcbcda15b3fe5ae1da76bf48868c4ce90fb
libqos: i2c: move address into QI2CDevice

This removes the hardcoded I2C address from the tests.  The address
is passed via QOSGraphEdgeOptions to i2c_device_create and stored
in the QI2CDevice.

The i2c_send and i2c_recv functions, along with their wrappers,
therefore, can be changed to take a QI2CDevice rather than an
adapter/address pair.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/ds1338-test.c
tests/libqos/i2c.c
tests/libqos/i2c.h
tests/pca9552-test.c
tests/tmp105-test.c