From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Jason Baron" <jbaron@redhat.com>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Alex Horn" <alex.horn@cs.ox.ac.uk>,
"Andreas Färber" <andreas.faerber@web.de>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH v2 0/7] I2C libqos and tmp105 qtest support
Date: Fri, 14 Dec 2012 12:34:25 +0100 [thread overview]
Message-ID: <1355484872-11283-1-git-send-email-andreas.faerber@web.de> (raw)
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 verify
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 API
with a QOM property.
To do a qom-set for testing a non-zero temperature reading, we'll need either
a canonical path for the TMP105 or Jason's qtest_qmp_resp() to iterate over
qom-list /machine/unassigned output looking for type "tmp105" with qom-get.
Alex, if you could add a Tested-by (using object_property_set_int()) that
would be appreciated.
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 <anthony@codemonkey.ws>
Cc: Alex Horn <alex.horn@cs.ox.ac.uk>
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Alex Horn (1):
tmp105: Create API for TMP105 temperature sensor
Andreas Färber (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ändert, 453 Zeilen hinzugefügt(+), 45 Zeilen entfernt(-)
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
--
1.7.10.4
next reply other threads:[~2012-12-14 11:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 11:34 Andreas Färber [this message]
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 1/7] tmp105: Create API for TMP105 temperature sensor Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 2/7] libqtest: Prepare I2C libqos Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 3/7] tmp105: Split out I2C message constants from header Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 4/7] tests: Add tmp105 qtest test case Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 5/7] tmp105: Fix I2C protocol bug Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 6/7] tmp105: QOM'ify Andreas Färber
2012-12-14 11:34 ` [Qemu-devel] [PATCH v2 7/7] tmp105: Add temperature QOM property Andreas Färber
2012-12-15 16:52 ` Alex Horn
2012-12-15 18:30 ` Andreas Färber
2013-01-06 21:07 ` [Qemu-devel] [PATCH v2 0/7] I2C libqos and tmp105 qtest support Andreas Färber
2013-01-07 19:36 ` Anthony Liguori
2013-01-07 19:37 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355484872-11283-1-git-send-email-andreas.faerber@web.de \
--to=andreas.faerber@web.de \
--cc=alex.horn@cs.ox.ac.uk \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=jbaron@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).