Re: [Qemu-devel] [PATCH 03/13] libqos: move common i2c code to libqos

2019-04-10 Thread Paolo Bonzini
On 09/04/19 11:42, Thomas Huth wrote: >> -static void tmp105_set16(I2CAdapter *i2c, uint8_t addr, uint8_t reg, >> - uint16_t value) >> -{ >> -uint8_t cmd[3]; >> -uint8_t resp[2]; >> - >> -cmd[0] = reg; >> -cmd[1] = value >> 8; >> -cmd[2] = value & 255; >>

Re: [Qemu-devel] [PATCH 03/13] libqos: move common i2c code to libqos

2019-04-09 Thread Thomas Huth
On 18/03/2019 18.15, Paolo Bonzini wrote: > 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 l

[Qemu-devel] [PATCH 03/13] libqos: move common i2c code to libqos

2019-03-18 Thread Paolo Bonzini
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