qemu-e2k/hw/i2c
Peter Crosthwaite 056fca7b51 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>
2016-06-14 15:59:14 +01:00
..
aspeed_i2c.c i2c: add aspeed i2c controller 2016-06-06 16:59:29 +01:00
bitbang_i2c.c hw/i2c: QOM'ify bitbang_i2c.c 2016-06-14 15:59:13 +01:00
bitbang_i2c.h i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
core.c i2c: Factor our send() and recv() common logic 2016-06-14 15:59:14 +01:00
exynos4210_i2c.c hw/i2c: QOM'ify exynos4210_i2c.c 2016-06-14 15:59:13 +01:00
imx_i2c.c hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
Makefile.objs i2c: add aspeed i2c controller 2016-06-06 16:59:29 +01:00
omap_i2c.c hw/i2c: QOM'ify omap_i2c.c 2016-06-14 15:59:13 +01:00
pm_smbus.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
smbus_eeprom.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
smbus_ich9.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
smbus.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
versatile_i2c.c hw/i2c: QOM'ify versatile_i2c.c 2016-06-14 15:59:13 +01:00