From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lu Jingchang-B35083 Subject: RE: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller support Date: Fri, 2 Aug 2013 05:19:21 +0000 Message-ID: References: <1371545327-12481-1-git-send-email-b35083@freescale.com> <20130801203301.GB5117@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20130801203301.GB5117-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Content-Language: en-US Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sascha Hauer Cc: "wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org" , "shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , Estevam Fabio-R49496 , "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Jin Zhengxiong-R64188 , Li Xiaochun-B41219 List-Id: linux-i2c@vger.kernel.org > Using a struct type with a div and regval member would make the code > surrounding this array more obviously correct. Would be nice to > straighten this first before adding another array. > > How about adding a regshift member instead? It seems shifting the vybrid > registers by two bits is the imx registers. [Lu Jingchang-B35083] Yes, using a struct for the i2c clock {div, regval} pairs would be more readable, and the registers indeed have the same address offset. I'll make some change and send the v3 patch. Thanks! Best Regards, Jingchang From mboxrd@z Thu Jan 1 00:00:00 1970 From: B35083@freescale.com (Lu Jingchang-B35083) Date: Fri, 2 Aug 2013 05:19:21 +0000 Subject: [PATCH v2 2/2] i2c: imx: Add Vybrid VF610 I2C controller support In-Reply-To: <20130801203301.GB5117@pengutronix.de> References: <1371545327-12481-1-git-send-email-b35083@freescale.com> <20130801203301.GB5117@pengutronix.de> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > Using a struct type with a div and regval member would make the code > surrounding this array more obviously correct. Would be nice to > straighten this first before adding another array. > > How about adding a regshift member instead? It seems shifting the vybrid > registers by two bits is the imx registers. [Lu Jingchang-B35083] Yes, using a struct for the i2c clock {div, regval} pairs would be more readable, and the registers indeed have the same address offset. I'll make some change and send the v3 patch. Thanks! Best Regards, Jingchang