[PATCH] i2c: do not try to load modules for of-registered devices

2015-01-16 Thread Dmitry Torokhov
Trying to register an I2C device asynchronously (via async_schedule() call) results in an ugly warning from request_module() warning about potential deadlock (because request_module tries to wait for async works to complete). While we could try to switch to request_module_nowait(), other buses, as

Re: [RFC 01/11] i2c: add quirk structure to describe adapter flaws

2015-01-16 Thread Yingjoe Chen
On Fri, 2015-01-09 at 18:21 +0100, Wolfram Sang wrote: > The number of I2C adapters which are not fully I2C compatible is rising, > sadly. Drivers usually do handle the flaws, still the user receives only > some errno for a transfer which normally can be expected to work. This > patch introduces a

[PATCH v2] i2c: mv64xxx: enable acquisition of timeout value from Device Tree

2015-01-16 Thread Gregory CLEMENT
From: Marcin Wojtas This commit enables obtaining the transaction timeout value in miliseconds using the timeout-ms property. If it doesn't succeed, the default value of 1000ms is set. The Device Tree binding documentation is updated accordingly. [gregory.clem...@free-electrons.com: convert com

Re: [PATCH V3 1/1] iio: Added Capella cm3232 ambient light sensor driver.

2015-01-16 Thread Daniel Baluta
On Fri, Jan 16, 2015 at 3:41 AM, Kevin Tsai wrote: > CM3232 is an advanced ambient light sensor with I2C protocol interface. > The I2C slave address is internally hardwired as 0x10 (7-bit). Writing > to configure register is byte mode, but reading ALS register requests to > use word mode for 16-b

[PATCH v4 0/2] ARM: mediatek: Add driver for Mediatek I2C controller

2015-01-16 Thread Eddie Huang
This series is the fourth version of Mediatek SoCs I2C controller common bus driver. Change in v4: Modify to support i2c_adapter_quirks base on Wolfram's patch [1]. Remove check transfer size and WRRD combine code. Instead, fill quirk property and let i2c_check_for_quirks to do the filter. This d

[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

[PATCH v4 1/2] dt-bindings: Add I2C bindings for mt65xx/mt81xx.

2015-01-16 Thread Eddie Huang
From: Xudong Chen Add devicetree bindings for Mediatek Soc I2C driver. Signed-off-by: Xudong Chen Signed-off-by: Eddie Huang --- .../devicetree/bindings/i2c/i2c-mt6577.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindin

Re: [PATCH] i2c: exynos5: Move initialization code to subsys_initcall()

2015-01-16 Thread Thierry Reding
On Tue, Jan 13, 2015 at 02:13:51PM +0200, Tomi Valkeinen wrote: > On 12/01/15 10:43, Joonyoung Shim wrote: > > +Cc Tomi Valkeinen, > > > > Hi Uwe, > > > > On 01/12/2015 04:50 PM, Uwe Kleine-König wrote: > >> Hello, > >> > >> On Mon, Jan 12, 2015 at 11:53:02AM +0900, Joonyoung Shim wrote: > >>> Th

[RFC 3/3] i2c: s3c2410: Adopt i2c-s3c2410 driver for new enhancement of i2c API

2015-01-16 Thread Paul Osmialowski
This adopts i2c-s3c2410 driver for new enhancement of i2c API that exposes preparation and unpreparation stages of i2c transfer. Signed-off-by: Paul Osmialowski --- drivers/i2c/busses/i2c-s3c2410.c | 69 1 file changed, 63 insertions(+), 6 deletions(-) d

[RFC 2/3] regmap: Use the enhancement of i2c API to address circular dependency problem

2015-01-16 Thread Paul Osmialowski
This uses the enhancement of i2c API in order to address following problem caused by circular lock dependency: -> #1 (prepare_lock){+.+.+.}: [2.730502][] __lock_acquire+0x3c0/0x8a4 [2.735970][] lock_acquire+0x6c/0x8c [2.741090][] mutex_lock_nested+0x68/0x464 [

[RFC 1/3] i2c: Enhancement of i2c API to address circular lock dependency problem

2015-01-16 Thread Paul Osmialowski
This enhancement of i2c API is designed to address following problem caused by circular lock dependency: -> #1 (prepare_lock){+.+.+.}: [2.730502][] __lock_acquire+0x3c0/0x8a4 [2.735970][] lock_acquire+0x6c/0x8c [2.741090][] mutex_lock_nested+0x68/0x464 [2.74

Re: [RFC 2/3] regmap: Use the enhancement of i2c API to address circular dependency problem

2015-01-16 Thread Mark Brown
On Fri, Jan 16, 2015 at 03:39:53PM +0100, Paul Osmialowski wrote: > This uses the enhancement of i2c API in order to address following problem > caused by circular lock dependency: Please don't just dump enormous backtraces into commit messages as explanations, explain in words what the problem y

Re: [RFC 3/3] i2c: s3c2410: Adopt i2c-s3c2410 driver for new enhancement of i2c API

2015-01-16 Thread Mark Brown
On Fri, Jan 16, 2015 at 03:39:54PM +0100, Paul Osmialowski wrote: > This adopts i2c-s3c2410 driver for new enhancement of i2c API that > exposes preparation and unpreparation stages of i2c transfer. This doesn't seem to have any dependency on the previous patch at all... it probably does want a be

Re: [RFC 2/3] regmap: Use the enhancement of i2c API to address circular dependency problem

2015-01-16 Thread Paul Osmialowski
On Fri, 16 Jan 2015, Mark Brown wrote: On Fri, Jan 16, 2015 at 03:39:53PM +0100, Paul Osmialowski wrote: This uses the enhancement of i2c API in order to address following problem caused by circular lock dependency: Please don't just dump enormous backtraces into commit messages as explana

Re: [RFC 2/3] regmap: Use the enhancement of i2c API to address circular dependency problem

2015-01-16 Thread Mark Brown
On Fri, Jan 16, 2015 at 06:36:14PM +0100, Paul Osmialowski wrote: > On Fri, 16 Jan 2015, Mark Brown wrote: > >I don't know what this means, sorry. I'm also very worried about the > >fact that this is being discussed purely in terms of I2C - why would > >this not affect other buses? > I tried to

Re: [PATCH v4 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus

2015-01-16 Thread Ray Jui
On 1/15/2015 12:44 AM, Uwe Kleine-König wrote: > Hello, > > On Wed, Jan 14, 2015 at 02:23:33PM -0800, Ray Jui wrote: >> Add I2C device nodes and its properties in bcm-cygnus.dtsi but keep >> them disabled there. Individual I2C devices can be enabled in board >> specific dts file when I2C slave d

Re: [PATCH v4 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus

2015-01-16 Thread Uwe Kleine-König
Hello, On Fri, Jan 16, 2015 at 11:24:09AM -0800, Ray Jui wrote: > >> + i2c0: i2c@18008000 { > >> + compatible = "brcm,iproc-i2c"; > > in patch 2 you wrote the driver is for a family of SoCs, right? Then I'd > > make this: > > > > compatible = "brcm,$mysoc-iproc-i2c", "brcm,iproc-i2c

Re: [PATCH v4 2/3] i2c: iproc: Add Broadcom iProc I2C Driver

2015-01-16 Thread Ray Jui
On 1/15/2015 12:41 AM, Uwe Kleine-König wrote: > Hello, > > On Wed, Jan 14, 2015 at 02:23:32PM -0800, Ray Jui wrote: >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > some of them are not ne

Re: [PATCH] i2c-ocores: add common clock support

2015-01-16 Thread Peter Korsgaard
> "Max" == Max Filippov writes: > Allow bus clock specification as a common clock handle. This makes this > controller easier to use in a setup based on common clock framework. > Signed-off-by: Max Filippov Looks sensible to me - Thanks. Acked-by: Peter Korsgaard -- Bye, Peter Korsg

Re: [PATCH v3 2/3] i2c: iproc: Add Broadcom iProc I2C Driver

2015-01-16 Thread Ray Jui
On 1/15/2015 3:59 AM, Wolfram Sang wrote: + case M_CMD_STATUS_LOST_ARB: + dev_err(dev->device, "lost bus arbitration\n"); >>> I wouldn't dev_err that, only dev_dbg. I'm not sure how usual the errors >>> for the next two cases is, maybe degrade them to dev_dbg, too? >>> >> Thes

Re: [PATCH v4 2/3] i2c: iproc: Add Broadcom iProc I2C Driver

2015-01-16 Thread Ray Jui
On 1/15/2015 4:07 AM, Wolfram Sang wrote: >>> +static int bcm_iproc_i2c_remove(struct platform_device *pdev) >>> +{ >>> + struct bcm_iproc_i2c_dev *iproc_i2c = platform_get_drvdata(pdev); >>> + >>> + i2c_del_adapter(&iproc_i2c->adapter); >> You need to free the irq before i2c_del_adapter. >

Re: [PATCH v4 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus

2015-01-16 Thread Ray Jui
On 1/16/2015 11:48 AM, Uwe Kleine-König wrote: > Hello, > > On Fri, Jan 16, 2015 at 11:24:09AM -0800, Ray Jui wrote: + i2c0: i2c@18008000 { + compatible = "brcm,iproc-i2c"; >>> in patch 2 you wrote the driver is for a family of SoCs, right? Then I'd >>> make this: >>> >>>

[PATCH v5 0/3] Add I2C support to Broadcom iProc

2015-01-16 Thread Ray Jui
This patchset contains the initial I2C support for Broadcom iProc family of SoCs. The iProc I2C controller has separate internal TX and RX FIFOs, each has a size of 64 bytes. The iProc I2C controller supports two bus speeds including standard mode (100 kHz) and fast mode (400 kHz) Changes from v4

[PATCH v5 1/3] i2c: iProc: define Broadcom iProc I2C binding

2015-01-16 Thread Ray Jui
Document the I2C device tree binding for Broadcom iProc family of SoCs Signed-off-by: Ray Jui Reviewed-by: Scott Branden --- .../devicetree/bindings/i2c/brcm,iproc-i2c.txt | 37 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c

[PATCH v5 2/3] i2c: iproc: Add Broadcom iProc I2C Driver

2015-01-16 Thread Ray Jui
Add initial support to the Broadcom iProc I2C controller found in the iProc family of SoCs. The iProc I2C controller has separate internal TX and RX FIFOs, each has a size of 64 bytes. The iProc I2C controller supports two bus speeds including standard mode (100kHz) and fast mode (400kHz) Signed-

[PATCH v5 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus

2015-01-16 Thread Ray Jui
Add I2C device nodes and its properties in bcm-cygnus.dtsi but keep them disabled there. Individual I2C devices can be enabled in board specific dts file when I2C slave devices are enabled in the future Signed-off-by: Ray Jui Reviewed-by: Scott Branden --- arch/arm/boot/dts/bcm-cygnus.dtsi |