Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Yingjoe Chen
Hi, On Wed, 2015-01-21 at 16:31 +0100, Uwe Kleine-König wrote: > Hello, > > On Wed, Jan 21, 2015 at 08:49:40PM +0800, Yingjoe Chen wrote: > > On Wed, 2015-01-21 at 09:15 +0100, Uwe Kleine-König wrote: <...> > > > > > > > +static int mtk_i2c_remove(struct platform_device *pdev) > > > > > > > +{ >

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Uwe Kleine-König
Hello, On Wed, Jan 21, 2015 at 08:49:40PM +0800, Yingjoe Chen wrote: > On Wed, 2015-01-21 at 09:15 +0100, Uwe Kleine-König wrote: > > On Wed, Jan 21, 2015 at 02:30:09PM +0800, Yingjoe Chen wrote: > > > On Wed, 2015-01-21 at 11:13 +0800, Eddie Huang wrote: > > > <...> > > > > > > + ret =

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Yingjoe Chen
On Wed, 2015-01-21 at 09:15 +0100, Uwe Kleine-König wrote: > Hello, > > On Wed, Jan 21, 2015 at 02:30:09PM +0800, Yingjoe Chen wrote: > > On Wed, 2015-01-21 at 11:13 +0800, Eddie Huang wrote: > > <...> > > > > > + ret = -EINVAL; > > > > > + goto err_exit; > > > > > + }

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Eddie Huang
Hi Uwe, On Wed, 2015-01-21 at 09:20 +0100, Uwe Kleine-König wrote: > Hello, > > On Wed, Jan 21, 2015 at 11:13:24AM +0800, Eddie Huang wrote: > > > > + /* set when doing the transfer */ > > > > + u16 irq_stat; /* interrupt status */ > > > > + unsigned int speed_

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Uwe Kleine-König
Hello, On Wed, Jan 21, 2015 at 11:13:24AM +0800, Eddie Huang wrote: > > > + /* set when doing the transfer */ > > > + u16 irq_stat; /* interrupt status */ > > > + unsigned int speed_hz; /* The speed in transfer */ > > > + bool trans_stop;/* i2c transfer s

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-21 Thread Uwe Kleine-König
Hello, On Wed, Jan 21, 2015 at 02:30:09PM +0800, Yingjoe Chen wrote: > On Wed, 2015-01-21 at 11:13 +0800, Eddie Huang wrote: > <...> > > > > + ret = -EINVAL; > > > > + goto err_exit; > > > > + } > > > > + > > > > + if (msgs->buf == NULL) { > > > > +

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-20 Thread Yingjoe Chen
Hi Uwe, Thanks for your review, On Wed, 2015-01-21 at 11:13 +0800, Eddie Huang wrote: <...> > > > + ret = -EINVAL; > > > + goto err_exit; > > > + } > > > + > > > + if (msgs->buf == NULL) { > > > + dev_dbg(i2c->dev, " data buffer is NULL.\n"); > > > + ret = -EINVAL

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-20 Thread Eddie Huang
Hi Uwe, On Sun, 2015-01-18 at 11:18 +0100, Uwe Kleine-König wrote: > Hello, > > On Fri, Jan 16, 2015 at 06:33:38PM +0800, Eddie Huang wrote: > > +config I2C_MT65XX > > + tristate "MediaTek I2C adapter" > > + depends on ARCH_MEDIATEK > depends on ARCH_MEDIATEK || COMPILE_TEST > default ARCH_ME

Re: [PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-18 Thread Uwe Kleine-König
Hello, On Fri, Jan 16, 2015 at 06:33:38PM +0800, Eddie Huang wrote: > +config I2C_MT65XX > + tristate "MediaTek I2C adapter" > + depends on ARCH_MEDIATEK depends on ARCH_MEDIATEK || COMPILE_TEST default ARCH_MEDIATEK would be nice to have to get better compile coverage. > +struct mtk_i2c

[PATCH v4 2/2] I2C: mediatek: Add driver for MediaTek I2C controller

2015-01-16 Thread Eddie Huang
From: Xudong Chen The mediatek SoCs have I2C controller that handle I2C transfer. This patch include common I2C bus driver. This driver is compatible with I2C controller on mt65xx/mt81xx. Signed-off-by: Xudong Chen Signed-off-by: Eddie Huang --- drivers/i2c/busses/Kconfig | 9 + driver