diff options
author | Peter Crosthwaite | 2016-06-14 16:59:14 +0200 |
---|---|---|
committer | Peter Maydell | 2016-06-14 16:59:14 +0200 |
commit | 056fca7b51d949aa0e18e0eb647838874a53bcbe (patch) | |
tree | d2c5988ee4bc5cf38b19519a94697443d3095d73 /include/hw/misc | |
parent | i2c: implement broadcast write (diff) | |
download | qemu-056fca7b51d949aa0e18e0eb647838874a53bcbe.tar.gz qemu-056fca7b51d949aa0e18e0eb647838874a53bcbe.tar.xz qemu-056fca7b51d949aa0e18e0eb647838874a53bcbe.zip |
i2c: Factor our send() and recv() common logic
Most of the control flow logic between send and recv (error checking
etc) is the same. Factor this out into a common send_recv() API.
This is then usable by clients, where the control logic for send
and receive differs only by a boolean. E.g.
if (send)
i2c_send(...):
else
i2c_recv(...);
becomes:
i2c_send_recv(... , send);
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1465833014-21982-4-git-send-email-fred.konrad@greensocs.com
Changes from FK:
* Rebased on master.
* Rebased on my i2c broadcast patch.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/misc')
0 files changed, 0 insertions, 0 deletions