On 05/05/2013 01:34 PM, Andreas Färber wrote:
Am 05.05.2013 05:14, schrieb Peter Crosthwaite:
On Sun, May 5, 2013 at 12:09 AM, Jean-Christophe DUBOIS
<j...@tribudubois.net> wrote:
diff --git a/hw/i2c/imx_i2c.c b/hw/i2c/imx_i2c.c
new file mode 100644
index 0000000..5b0d046
--- /dev/null
+++ b/hw/i2c/imx_i2c.c
[...]
+typedef struct imx_i2c_state {
types should be in CamelCase IMXI2CState
+ SysBusDevice parent_obj;
While at it, please add a white line here. Background is that this
parent field will pretty likely go away once we switch to a better
object-orientation framework - if it were in a header we would annotate
it as private and thus hidden from documentation.
Will do.
+ MemoryRegion iomem;
+ i2c_bus *bus;
Please rather use i2c_bus bus; and qbus_create_inline() in instance_init.
I am using i2c_init_bus() which itself uses qbus_create().
Do you mean we should not use i2c_init_bus() but instead reimplement
locally based on qbus_create_inline()?
JC