From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsIUU-0006lE-Eb for qemu-devel@nongnu.org; Mon, 07 Jan 2013 14:36:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsIUS-0005Iw-Tw for qemu-devel@nongnu.org; Mon, 07 Jan 2013 14:36:10 -0500 Received: from mail-ie0-f172.google.com ([209.85.223.172]:49173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsIUS-0005Ik-PM for qemu-devel@nongnu.org; Mon, 07 Jan 2013 14:36:08 -0500 Received: by mail-ie0-f172.google.com with SMTP id c13so24585190ieb.3 for ; Mon, 07 Jan 2013 11:36:08 -0800 (PST) From: Anthony Liguori In-Reply-To: <1355484872-11283-1-git-send-email-andreas.faerber@web.de> References: <1355484872-11283-1-git-send-email-andreas.faerber@web.de> Date: Mon, 07 Jan 2013 13:36:04 -0600 Message-ID: <871udwvl97.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/7] I2C libqos and tmp105 qtest support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org Cc: Peter Maydell , Jason Baron , Blue Swirl , Alex Horn , Paolo Bonzini Andreas F=C3=A4rber writes: > Hello, > > Here's I2C support for the libqos framework and an OMAP driver. > The design was inspired by QEMU's i2c_bus and Linux' i2c_adapter. > Seems like low hanging fruit (while we're still waiting for PCI support := )), > hopefully motivating more people to contribute qtests for new devices or > bug fixes. > > I found a bug in omap_i2c related to the SBD bit not getting cleared after > a single-byte read; the patch has been dropped as we were not able to ver= ify > it against a TRM or hardware. The driver was therefore changed to ignore = the > SBD bit, like the Linux driver does. > > I've split up the proposed tmp105.h header further to facilitate reuse of > the register enum in qtest. > > The test case itself initially fails; in lack of a v2 patch by Alex I'm > appending my own fix proposal that makes the test pass. > > I'm also appending a QOM'ish cleanup of the file, replacing the current A= PI > with a QOM property. > To do a qom-set for testing a non-zero temperature reading, we'll need ei= ther > a canonical path for the TMP105 or Jason's qtest_qmp_resp() to iterate ov= er > qom-list /machine/unassigned output looking for type "tmp105" with qom-ge= t. > > Alex, if you could add a Tested-by (using object_property_set_int()) that > would be appreciated. Looks good. Whole series: Reviewed-by: Anthony Liguori Regards, Anthony Liguori > > Regards, > Andreas > > v1 -> v2: > * Factor out libqos API for I2C and an OMAP driver > * Avoid casts by using uint8_t* in API, suggested by Blue > * Ignore SBD bit in omap_i2c driver > * Drop omap_i2c patch clearing SBD > * Incorporate Alex' tmp105.h patch > * Split out tmp105_regs.h for qtest, inspired by rtc-test > * Append replacement for Alex' fix > * Append QOM cleanup and turn setter function into QOM property > > Cc: Anthony Liguori > Cc: Alex Horn > Cc: Andrzej Zaborowski > Cc: Peter Maydell > Cc: Blue Swirl > > Cc: Jason Baron > Cc: Paolo Bonzini > > Alex Horn (1): > tmp105: Create API for TMP105 temperature sensor > > Andreas F=C3=A4rber (6): > libqtest: Prepare I2C libqos > tmp105: Split out I2C message constants from header > tests: Add tmp105 qtest test case > tmp105: Fix I2C protocol bug > tmp105: QOM'ify > tmp105: Add temperature QOM property > > hw/i2c.h | 3 - > hw/tmp105.c | 101 ++++++++++++++++++------------- > hw/tmp105.h | 47 +++++++++++++++ > hw/tmp105_regs.h | 50 ++++++++++++++++ > tests/Makefile | 3 + > tests/libi2c-omap.c | 166 +++++++++++++++++++++++++++++++++++++++++++++= ++++++ > tests/libi2c.c | 22 +++++++ > tests/libi2c.h | 30 ++++++++++ > tests/tmp105-test.c | 76 +++++++++++++++++++++++ > 9 Dateien ge=C3=A4ndert, 453 Zeilen hinzugef=C3=BCgt(+), 45 Zeilen entfe= rnt(-) > create mode 100644 hw/tmp105.h > create mode 100644 hw/tmp105_regs.h > create mode 100644 tests/libi2c-omap.c > create mode 100644 tests/libi2c.c > create mode 100644 tests/libi2c.h > create mode 100644 tests/tmp105-test.c > > --=20 > 1.7.10.4