Re: [PATCH] i2c: imx: choose the better clock divider

2011-06-15 Thread Eric Miao
Sorry forgot to include Ben. Ben, any ideas? On Tue, Jun 14, 2011 at 3:17 PM, Eric Miao eric.m...@linaro.org wrote: The original algorithm doesn't perform very well in some cases, e.g.  When the source clock of the I2C controller is 66MHz, and the  requested rate is 100KHz, it gives

[PATCH] i2c: imx: choose the better clock divider

2011-06-14 Thread Eric Miao
one by comparing the rate distances calculated by two adjacent dividers. Cc: Richard Zhao richard.z...@linaro.org Signed-off-by: Eric Miao eric.m...@linaro.org --- drivers/i2c/busses/i2c-imx.c | 46 - 1 files changed, 31 insertions(+), 15 deletions

Re: [PATCH 1/3] i2c: append hardware lock with bus lock

2011-04-28 Thread Eric Miao
On Thu, Apr 28, 2011 at 4:22 PM, Jean Delvare kh...@linux-fr.org wrote: Hi Haojian, On Thu, 28 Apr 2011 12:02:36 +0800, Haojian Zhuang wrote: Both AP and CP are contained in Marvell PXA910 silicon. These two ARM cores are sharing one pair of I2C pins. In order to keep I2C transaction

Re: [PATCH 2/6] ARM: pxa2xx: reorganize I2C files

2011-03-01 Thread Eric Miao
On Wed, Mar 2, 2011 at 8:49 AM, Ben Dooks ben-li...@fluff.org wrote: On 23/02/11 11:38, Sebastian Andrzej Siewior wrote: This patch moves the platform data definition from arch/arm/plat-pxa/include/plat/i2c.h to include/linux/i2c/pxa-i2c.h so it can be accessed from x86 the same way as on

Re: [PATCH] i2c-pxa: fix compiler warning, due to missing const

2010-06-15 Thread Eric Miao
/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c:1004: warning: initialization discards qualifiers from pointer target type Signed-off-by: Marc Kleine-Budde m...@pengutronix.de Cc: Eric Miao eric.y.m...@gmail.com Ack Cc: Roel Kluin roel.kl...@gmail.com Cc: Pavel Machek pa...@ucw.cz ---  drivers

Re: [PATCH V2] mach-pxa/viper: Fix timeout usage for I2C

2010-04-20 Thread Eric Miao
. Assume with HZ=100 '100' means 1s here and adapt accordingly. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Eric Miao eric.y.m...@gmail.com Cc: Russell King li...@arm.linux.org.uk Cc: Marc Zyngier m...@misterjones.org Cc: Paul Shen paul.s...@marvell.com Cc: Mike Rapoport m

Re: [PATCH V2] mach-pxa/viper: Fix timeout usage for I2C

2010-04-19 Thread Eric Miao
On Sun, Apr 18, 2010 at 7:48 PM, Wolfram Sang w.s...@pengutronix.de wrote: The timeout value is in jiffies, so it should be using HZ, not a plain number. Assume with HZ=100 '100' means 1s here and adapt accordingly. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Eric Miao eric.y.m

Re: [PATCH] mach-pxa/viper: Fix timeout usage for I2C

2010-04-12 Thread Eric Miao
On Sun, Apr 4, 2010 at 10:08 PM, Wolfram Sang w.s...@pengutronix.de wrote: The timeout value is in jiffies, so it should be using HZ, not a plain number. Assume '100' means 100ms here and adapt accordingly. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Eric Miao eric.y.m...@gmail.com

Re: [PATCH] mach-pxa/viper: Fix timeout usage for I2C

2010-04-12 Thread Eric Miao
wrote: On Tue, 13 Apr 2010 01:57:51 +0800, Eric Miao wrote: One other better and cleaner approach to such inconsistency issue is to have a timeout_ms field, and having i2c-gpio.c driver to convert this to jiffies using msec_to_jiffies() at run-time. With what benefit

Re: [PATCH 1/1] fix i2c_msg.len not aligning with i2c_master_send

2010-02-05 Thread Eric Miao
Hi, Jean Thanks for your instruction. Here is patch to modify some comments of i2c_master_send i2c_master_recv, is this OK. Where's the screaming things, dude? Thanks Zhangfei From 30fbf1ebf1facba3d280c887e2ecfd0499e7b04b Mon Sep 17 00:00:00 2001 From: Zhangfei Gao zg...@marvell.com

Re: [PATCH 1/1] fix i2c_msg.len not aligning with i2c_master_send

2010-02-04 Thread Eric Miao
How about return error in i2c_master_send i2c_master_recv when count is bigger than 64K, as suggested by Ben. I think that's more preferable. Making the count parameter as u16, though is going to generate a warning, yet that's usually ignored by careless programmer, screaming out when this