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
Andreas Färber
9fe451a08e
i2c: Drop FROM_I2C_SLAVE() macro
...
We now use type-specific QOM cast macros instead.
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com >
Signed-off-by: Andreas Färber <afaerber@suse.de >
2014-02-14 16:22:32 +01:00
Andreas Färber
a5c828525e
i2c: Rename i2c_bus to I2CBus
...
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com >
Signed-off-by: Andreas Färber <afaerber@suse.de >
2014-02-14 16:22:31 +01:00
Paolo Bonzini
0d09e41a51
hw: move headers to include/
...
Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2013-04-08 18:13:10 +02:00