Received: from eggs.gnu.org ([208.118.235.92]:59410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYy9G-0001bx-HS for qemu-devel@nongnu.org; Sun, 05 May 2013 08:34:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYy9F-0007oD-IA for qemu-devel@nongnu.org; Sun, 05 May 2013 08:34:38 -0400 Received: from zose-mta11.web4all.fr ([178.33.204.87]:46054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYy9F-0007o8-Ce for qemu-devel@nongnu.org; Sun, 05 May 2013 08:34:37 -0400 Message-ID: <518651DA.4090601@tribudubois.net> Date: Sun, 05 May 2013 14:34:34 +0200 From: Jean-Christophe DUBOIS MIME-Version: 1.0 References: <518643C8.7010207@suse.de> In-Reply-To: <518643C8.7010207@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 2/4] Add i.MX I2C controller driver. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: peter.maydell@linaro.org, Peter Crosthwaite , peter.chubb@nicta.com.au, qemu-devel@nongnu.org On 05/05/2013 01:34 PM, Andreas F=E4rber wrote: > Am 05.05.2013 05:14, schrieb Peter Crosthwaite: >> On Sun, May 5, 2013 at 12:09 AM, Jean-Christophe DUBOIS >> 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_ini= t. I am using i2c_init_bus() which itself uses qbus_create(). Do you mean we should not use i2c_init_bus() but instead reimplement=20 locally based on qbus_create_inline()? JC