qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 03/13] libqos: move common i2c code to libqos
Date: Wed, 10 Apr 2019 14:19:25 +0200	[thread overview]
Message-ID: <b419a03e-a512-66ec-220a-c787e3e6739e@redhat.com> (raw)
In-Reply-To: <6792361a-9a55-c97e-51e4-888ec87aeb7b@redhat.com>

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;
>> -    i2c_send(i2c, addr, cmd, 3);
>> -    i2c_recv(i2c, addr, resp, 2);
>> -    g_assert_cmphex(resp[0], ==, cmd[1]);
>> -    g_assert_cmphex(resp[1], ==, cmd[2]);
>> -}
> ... but the old set8/16 functions also used i2c_recv() and
> g_assert_cmphex() ... shouldn't this be added to the new functions, too?

That is dependent on the actual device you are working with.  I probably
should add some code to the tmp105 test that tests this behavior too.

Paolo

  parent reply	other threads:[~2019-04-10 12:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190318171521.8524-1-pbonzini@redhat.com>
     [not found] ` <20190318171521.8524-3-pbonzini@redhat.com>
2019-04-09  9:27   ` [Qemu-devel] [PATCH 02/13] qgraph: fix qos_node_contains with options Thomas Huth
2019-04-09  9:27     ` Thomas Huth
     [not found] ` <20190318171521.8524-4-pbonzini@redhat.com>
2019-04-09  9:42   ` [Qemu-devel] [PATCH 03/13] libqos: move common i2c code to libqos Thomas Huth
2019-04-09  9:42     ` Thomas Huth
2019-04-10 12:19     ` Paolo Bonzini [this message]
2019-04-10 12:19       ` Paolo Bonzini
     [not found] ` <20190318171521.8524-6-pbonzini@redhat.com>
2019-04-09  9:50   ` [Qemu-devel] [PATCH 05/13] pca9552-test: do not rely on state across tests Thomas Huth
2019-04-09  9:50     ` Thomas Huth
     [not found] ` <20190318171521.8524-7-pbonzini@redhat.com>
2019-04-09  9:54   ` [Qemu-devel] [PATCH 06/13] imx25-pdk: create ds1338 for qtest inside the test Thomas Huth
2019-04-09  9:54     ` Thomas Huth

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=b419a03e-a512-66ec-220a-c787e3e6739e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).