RE: Tegra I2C slave address patches

2011-05-13 Thread Wei Ni
Hi, Marc Configuring tegra i2c slave address does not put it into slave mode (as opposed to master mode). Tegra can act as an i2c master as well as i2c slave. And 0xFC is not a special address. It's just an i2c address which is not being used by any other i2c slave devices. Thanks Wei.

Re: How to use one I2C device from two modules?

2011-05-13 Thread Jean Delvare
Hi Lars, On Fri, 13 May 2011 00:47:37 -0700 (PDT), Lars Michael wrote: --- On Sat, 7/5/11, Jean Delvare kh...@linux-fr.org wrote: On Fri, 6 May 2011 04:30:33 -0700 (PDT), Lars Michael wrote: But how do I access the same I2C device from several modules? Ideally I want to specify the

Re: [PATCH 09/13] i2c/i2c-nomadik: add code to retry on timeout failure

2011-05-13 Thread Linus Walleij
2011/5/11 Ben Dooks ben-...@fluff.org: @@ -579,63 +576,67 @@ static int nmk_i2c_xfer(struct i2c_adapter *i2c_adap, (...) this code is getting a bit complicated, could some of it be factored into a new sub-function? Yep I have added a new patch on top of this stack breaking out the single

[PATCH] i2c-i801: Don't depend on other kernel driver config options

2011-05-13 Thread Jean Delvare
Don't let other driver config options influence us, as it makes the code more complex and fragile for a small benefit. There's nothing wrong with instantiating I2C devices even if they don't have a driver. And we're talking about 835 extra bytes in the binary on x86-64, that's hardly worth arguing

Re: [PATCH] i2c-i801: Don't depend on other kernel driver config options

2011-05-13 Thread Woodhouse, David
On Fri, 2011-05-13 at 11:01 +0100, Jean Delvare wrote: Don't let other driver config options influence us, as it makes the code more complex and fragile for a small benefit. There's nothing wrong with instantiating I2C devices even if they don't have a driver. And we're talking about 835 extra

[PATCH 00/14] Various updates to the Nomadik I2C controller v2

2011-05-13 Thread Linus Walleij
This is an interation of the previous patch set that hopefully adress Ben's comments: we took some runtime PM hooks out and added a refactoring on the tail. Actually the last patch fixing the platform config can be fed into the I2C tree as well, if subsys maintainers are comfortable with it. I

[PATCH 06/14] i2c/i2c-nomadik: correct adapter timeout initialization

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Correct the incorrect initialization of adapter timeout not to be in milliseconds, as it needs to be done in jiffies. Signed-off-by: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Reviewed-by: Srinidhi

[PATCH 04/14] i2c/i2c-nomadik: corrrect returned error numbers

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com The code was returning bad error numbers or just -1 in some cases. Signed-off-by: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Reviewed-by: Srinidhi Kasagar srinidhi.kasa...@stericsson.com Signed-off-by:

[PATCH 09/14] i2c/i2c-nomadik: add code to retry on timeout failure

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com It is seen that i2c-nomadik controller randomly stops generating the interrupts leading to a i2c timeout. As a workaround to this problem, add retries to the on going transfer on failure. Signed-off-by: Virupax

[PATCH 08/14] i2c/i2c-nomadik: use pm_runtime API

2011-05-13 Thread Linus Walleij
From: Rabin Vincent rabin.vinc...@stericsson.com Use the pm_runtime API for pins control. Signed-off-by: Rabin Vincent rabin.vinc...@stericsson.com Reviewed-by: Srinidhi Kasagar srinidhi.kasa...@stericsson.com Reviewed-by: Jonas Aberg jonas.ab...@stericsson.com [deleted some surplus runtime PM

[PATCH 02/14] i2c/i2c-nomadik: make i2c timeout specific per i2c bus

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Add option to have different i2c timeout delay for different i2c buses specified in platform data. Default to the old value unless specified. Signed-off-by: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com

[PATCH 03/14] i2c/i2c-nomadik: fix speed enumerator

2011-05-13 Thread Linus Walleij
The I2C speed enumerators in the i2c-nomadik header file were in the wrong order. Signed-off-by: Linus Walleij linus.wall...@linaro.org --- arch/arm/plat-nomadik/include/plat/i2c.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-nomadik/include/plat/i2c.h

[PATCH 05/14] i2c/i2c-nomadik: remove the redundant error message

2011-05-13 Thread Linus Walleij
From: srinidhi kasagar srinidhi.kasa...@stericsson.com The abort cause string itself is an error, so remove the redundant explicit error message. Signed-off-by: Srinidhi Kasagar srinidhi.kasa...@stericsson.com Reviewed-by: Jonas Aberg jonas.ab...@stericsson.com Signed-off-by: Linus Walleij

[PATCH 10/14] i2c/i2c-nomadik: change the TX and RX threshold

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com 1) Increase RX FIFO threshold so that there is a reduction in the number of interrupts handled to complete a transaction. 2) Fill TX FIFO in the write function. Signed-off-by: Virupax Sadashivpetimath

[PATCH 14/14] mach-ux500: set proper I2C platform data from MOP500s

2011-05-13 Thread Linus Walleij
This specifies the new per-platform timeout per I2C bus and switches the I2C buses to fast mode, and increase the FIFO depth to 8 for reads and writes. Signed-off-by: Linus Walleij linus.wall...@linaro.org --- arch/arm/mach-ux500/board-mop500.c | 14 -- 1 files changed, 8

[PATCH 11/14] i2c/i2c-nomadik: remove the unnecessary delay

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com The delay in the driver seems to be not needed, so remove it. Signed-off-by: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Reviewed-by: Markus Grape markus.gr...@stericsson.com Tested-by: Per Persson

[PATCH 12/14] i2c/i2c-nomadik: reset the hw after status check

2011-05-13 Thread Linus Walleij
From: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com In case of I2C timeout, reset the HW only after the HW status is read, otherwise the staus will be lost. Signed-off-by: Virupax Sadashivpetimath virupax.sadashivpetim...@stericsson.com Reviewed-by: Jonas Aberg

[PATCH 13/14] i2c/i2c-nomadik: break out single messsage transmission

2011-05-13 Thread Linus Walleij
Reduce code size in the message transfer function by factoring out a single-message transfer function. Signed-off-by: Linus Walleij linus.wall...@linaro.org --- drivers/i2c/busses/i2c-nomadik.c | 80 +++--- 1 files changed, 48 insertions(+), 32 deletions(-)

[PATCH 1/2] pwm: Add __weak attributed functions for pwm operations

2011-05-13 Thread Mohan Pallaka
For chip drivers that support both pwm and non-pwm modes would encounter compilation errors if the platform doesn't have support for pwm though the chip is programmed to work in non-pwm mode. Add __weak attributed pwm functions to avoid compilation issues in these scenarios. Change-Id: