]> git.proxmox.com Git - mirror_qemu.git/commit
libqos: move common i2c code to libqos
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 18 Mar 2019 14:09:51 +0000 (15:09 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Jun 2019 12:03:01 +0000 (14:03 +0200)
commite8ecb706a8a3a75ea45387a3561b6debed9cacc3
treee0074f37da7f4dce193e64c8d11192762429e366
parent7d8ada6e4d20b47dcf42d22fc62599a9799eac7a
libqos: move common i2c code to libqos

The functions to read/write 8-bit or 16-bit registers are the same
in tmp105 and pca9552 tests, and in fact they are a special case of
"read block"/"write block" functionality; read block in turn is used
in ds1338-test.

Move everything inside libqos-test, removing the duplication.  Account
for the small differences by adding to tmp105-test.c the "read register
after writing" behavior that is specific to it.

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