Am 12.12.2012 20:43, schrieb Blue Swirl: > On Wed, Dec 12, 2012 at 6:29 AM, Andreas Färber <andreas.faer...@web.de> > wrote: >> +static void omap_i2c_send(uint8_t addr, const void *buf, uint16_t len) > > With const uint8_t *buf you could avoid a few casts below.
Good idea, thanks. I was working with other data types before, where void* saved casts. >> + qtest_add_func("/tmp105/tx-rx", send_and_receive); > > A register fuzzing test (like rtc-test.c) would be nice too. I'm aware of your register fuzzing tests. However we do not directly access registers of the tmp105, so those should go into an omap_i2c-test.c file instead if someone wants to ever test that implementation. Alex H. has pointed to some more real-world test cases which I'd invite him to add here as follow-ups. My quest for tonight will be to generalize the I2C API for libqos by comparing the tegra_i2c implementation. I hope my omap_i2c_* API is pretty close already if we add one parameter for an adapter struct. Andreas