[PATCH 5/6] i2c: Replace I2C_CROS_EC_TUNNEL dependency

2015-08-19 Thread Javier Martinez Canillas
The ChromeOS EC tunnel I2C bus driver depend on CROS_EC_PROTO but MFD_CROS_EC select CROS_EC_PROTO instead. Mixing select and depends on is bad practice as it may lead to circular Kconfig dependencies. Since the platform device that is matched with the I2C bus driver is registered by the ChromeOS

[PATCH 0/6] ChromeOS EC Kconfig cleanups

2015-08-19 Thread Javier Martinez Canillas
Hello, This patch series attemp to fix the issues that exist with the ChromeOS EC drivers Kconfig symbols. These are: 1) The MFD_CROS_EC config symbol select CROS_EC_PROTO and CHROME_PLATFORMS which caused a Kconfig unmet direct dependencies warning. 2) Mix of select and depends on for the

Re: [Patch v5] driver/i2c/mux: Add register-based mux i2c-mux-reg

2015-08-19 Thread Wolfram Sang
On Mon, Aug 17, 2015 at 11:53:48AM -0700, York Sun wrote: Based on i2c-mux-gpio driver, similarly the register-based mux switch from one bus to another by setting a single register. The register can be on PCIe bus, local bus, or any memory-mapped address. The endianness of such register can be

Re: [PATCH v2 0/2] I2C support for NXP LPC18xx family

2015-08-19 Thread Joachim Eastwood
On 19 August 2015 at 17:18, Wolfram Sang w...@the-dreams.de wrote: On Sun, Aug 16, 2015 at 08:10:15PM +0200, Joachim Eastwood wrote: This patch set adds a I2C driver and documentation for the I2C peripheral found on many NXP LPC MCUs. The driver is a rework of an old driver by Kevin Wells. It

Re: [PATCH v2 0/2] I2C support for NXP LPC18xx family

2015-08-19 Thread Wolfram Sang
On Sun, Aug 16, 2015 at 08:10:15PM +0200, Joachim Eastwood wrote: This patch set adds a I2C driver and documentation for the I2C peripheral found on many NXP LPC MCUs. The driver is a rework of an old driver by Kevin Wells. It has been modified to support modern resource allocation, device

Re: [PATCH] i2c: allow specifying separate wakeup interrupt in device tree

2015-08-19 Thread Wolfram Sang
@@ -659,20 +662,47 @@ static int i2c_device_probe(struct device *dev) if (!device_can_wakeup(client-dev)) device_init_wakeup(client-dev, client-flags I2C_CLIENT_WAKE); I was about to ask if we couldn't

Re: [PATCH] i2c: allow specifying separate wakeup interrupt in device tree

2015-08-19 Thread Dmitry Torokhov
Hi Wolfram, On Wed, Aug 19, 2015 at 10:43 AM, Wolfram Sang w...@the-dreams.de wrote: @@ -659,20 +662,47 @@ static int i2c_device_probe(struct device *dev) if (!device_can_wakeup(client-dev)) device_init_wakeup(client-dev,

Re: [PATCH v2 6/7] i2c: img-scb: Clear line and interrupt status before starting a transfer

2015-08-19 Thread James Hogan
On Fri, Aug 14, 2015 at 04:50:23PM +0100, Sifan Naeem wrote: Clear line status and all generated interrupts from the interrupt status register before starting a transfer, as we may have unserviced interrupts from previous transfers that might be handled in the context of the new transfer.

Re: [PATCH v2 5/7] i2c: img-scb: remove start bit detected status after handling

2015-08-19 Thread James Hogan
On Fri, Aug 14, 2015 at 04:50:22PM +0100, Sifan Naeem wrote: Remove start bit detected status after it is handled, doing so will prevent this condition being hit for every interrupt on a particular transfer. Fixes: commit 27bce457d588 (i2c: img-scb: Add Imagination Technologies I2C SCB

Re: [PATCH v2 7/7] i2c: img-scb: verify support for requested bit rate

2015-08-19 Thread James Hogan
On Fri, Aug 14, 2015 at 04:50:24PM +0100, Sifan Naeem wrote: The requested bit rate can be outside the range supported by the driver. The maximum bit rate this driver supports at the moment is 400Khz. If the requested bit rate is larger than the maximum supported by the driver, set the

[Patch v3] i2c: imx: implement bus recovery

2015-08-19 Thread Gao Pan
Implement bus recovery methods for i2c-imx so we can recover from situations where SCL/SDA are stuck low. Once i2c bus SCL/SDA are stuck low during transfer, config the i2c pinctrl to gpio mode by calling pinctrl sleep set function, and then use GPIO to emulate the i2c protocol to send nine dummy

Re: [Patch v2] i2c: imx: implement bus recovery

2015-08-19 Thread Uwe Kleine-König
Hello, Cc += Linus Walleij On Wed, Aug 19, 2015 at 03:44:49AM +, Gao Pandy wrote: From: Uwe Kleine-König mailto:u.kleine-koe...@pengutronix.de Sent: Thursday, August 13, 2015 4:15 PM +static void i2c_imx_prepare_recovery(struct i2c_adapter *adap) { + struct imx_i2c_struct *i2c_imx;

Re: [Patch v3] i2c: imx: implement bus recovery

2015-08-19 Thread Uwe Kleine-König
Hello, On Wed, Aug 19, 2015 at 03:04:01PM +0800, Gao Pan wrote: Implement bus recovery methods for i2c-imx so we can recover from situations where SCL/SDA are stuck low. Once i2c bus SCL/SDA are stuck low during transfer, config the i2c pinctrl to gpio mode by calling pinctrl sleep set

[Patch v4] i2c: imx: implement bus recovery

2015-08-19 Thread Gao Pan
Implement bus recovery methods for i2c-imx so we can recover from situations where SCL/SDA are stuck low. Once i2c bus SCL/SDA are stuck low during transfer, config the i2c pinctrl to gpio mode by calling pinctrl sleep set function, and then use GPIO to emulate the i2c protocol to send nine dummy

RE: [Patch v2] i2c: imx: implement bus recovery

2015-08-19 Thread Gao Pandy
From: linux-i2c-ow...@vger.kernel.org mailto:linux-i2c-ow...@vger.kernel.org Sent: Wednesday, August 19, 2015 3:02 PM To: Gao Pan-B54642 Cc: w...@the-dreams.de; linux-i2c@vger.kernel.org; Li Frank-B20596; Duan Fugang-B38611; Linus Walleij Subject: Re: [Patch v2] i2c: imx: implement bus

Re: [Patch v2] i2c: imx: implement bus recovery

2015-08-19 Thread Uwe Kleine-König
Hello, On Wed, Aug 19, 2015 at 07:43:51AM +, Gao Pandy wrote: On Wed, Aug 19, 2015 at 03:44:49AM +, Gao Pandy wrote: /* Set up adapter data */ i2c_set_adapdata(i2c_imx-adapter, i2c_imx); + /* Init recover pins */ + i2c_imx-pins.sda = +

RE: [Patch v3] i2c: imx: implement bus recovery

2015-08-19 Thread Gao Pandy
From: linux-i2c-ow...@vger.kernel.org mailto:linux-i2c-ow...@vger.kernel.org Sent: Wednesday, August 19, 2015 3:14 PM To: Gao Pan-B54642 Cc: w...@the-dreams.de; linux-i2c@vger.kernel.org; Li Frank-B20596; Duan Fugang-B38611; ker...@pengutronix.de Subject: Re: [Patch v3] i2c: imx: implement