Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Aaron Lu
On 09/11/2013 06:32 AM, Rafael J. Wysocki wrote: > On Tuesday, September 10, 2013 10:35:22 PM Mark Brown wrote: >> On Tue, Sep 10, 2013 at 10:04:21PM +0200, Rafael J. Wysocki wrote: >>> On Tuesday, September 10, 2013 05:13:21 PM Mark Brown wrote: >> OK, that is very much not the model which em

Re: [PATCH] i2c: davinci: Fix bad dev_get_platdata() conversion

2013-09-10 Thread Jingoo Han
On Wednesday, September 11, 2013 6:27 AM, Olof Johansson wrote: > On Tue, Sep 10, 2013 at 2:25 AM, Jingoo Han wrote: > > On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote: > >> On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote: > >> > commit 6d4028c644e (i2c: use dev_get_plat

[PATCH] i2c: imx: retry on NAK

2013-09-10 Thread Luka Perkov
From: Tim Harvey In case of busy i2c try again to get ACK. Signed-off-by: Tim Harvey Tested-by: Luka Perkov --- drivers/i2c/busses/i2c-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index ccf4665..c64afe

Re: [PATCH 3/5] i2c: rcar: add Device Tree support

2013-09-10 Thread Laurent Pinchart
Hi Magnus, On Wednesday 11 September 2013 07:40:54 Magnus Damm wrote: > Hi Guennadi, > > [CC Simon, Laurent] > > On Tue, Sep 10, 2013 at 12:55 AM, Guennadi Liakhovetski wrote: > > This patch adds Device Tree support to the i2c-rcar driver and respective > > documentation. > > > > Signed-off-by:

Re: [PATCH 5/5] i2c: rcar: use per-device clock

2013-09-10 Thread Magnus Damm
Hi Guennadi, On Tue, Sep 10, 2013 at 12:55 AM, Guennadi Liakhovetski wrote: > Using the same clock for all device instances is non-portable and obtaining > clock references by an ID without using a device pointer is discouraged. > This is also not needed, because on platforms, where this driver i

Re: [PATCH 3/5] i2c: rcar: add Device Tree support

2013-09-10 Thread Magnus Damm
Hi Laurent, On Wed, Sep 11, 2013 at 7:46 AM, Laurent Pinchart wrote: > Hi Magnus, > > On Wednesday 11 September 2013 07:40:54 Magnus Damm wrote: >> Hi Guennadi, >> >> [CC Simon, Laurent] >> >> On Tue, Sep 10, 2013 at 12:55 AM, Guennadi Liakhovetski wrote: >> > This patch adds Device Tree support

Re: [PATCH 3/5] i2c: rcar: add Device Tree support

2013-09-10 Thread Magnus Damm
Hi Guennadi, [CC Simon, Laurent] On Tue, Sep 10, 2013 at 12:55 AM, Guennadi Liakhovetski wrote: > This patch adds Device Tree support to the i2c-rcar driver and respective > documentation. > > Signed-off-by: Guennadi Liakhovetski > --- > Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 2

Re: [PATCH 2/5] i2c: rcar: get clock rate only once and simplify calculation

2013-09-10 Thread Magnus Damm
Hi Guennadi, On Tue, Sep 10, 2013 at 12:55 AM, Guennadi Liakhovetski wrote: > There is no need to repeatedly query clock frequency, where it is not > expected to change. The complete loop can also trivially be replaced with > a simple division. A further loop below the one, being simplified, coul

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Rafael J. Wysocki
On Tuesday, September 10, 2013 10:35:22 PM Mark Brown wrote: > On Tue, Sep 10, 2013 at 10:04:21PM +0200, Rafael J. Wysocki wrote: > > On Tuesday, September 10, 2013 05:13:21 PM Mark Brown wrote: > > > > OK, that is very much not the model which embedded systems follow, in > > > embedded systems th

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 10:04:21PM +0200, Rafael J. Wysocki wrote: > On Tuesday, September 10, 2013 05:13:21 PM Mark Brown wrote: > > OK, that is very much not the model which embedded systems follow, in > > embedded systems the driver for the device is fully in control of its > > own power. It g

Re: [PATCH] i2c: davinci: Fix bad dev_get_platdata() conversion

2013-09-10 Thread Olof Johansson
On Tue, Sep 10, 2013 at 2:25 AM, Jingoo Han wrote: > On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote: >> On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote: >> > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion >> > of this one case: >> > >> > drivers/i2

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Rafael J. Wysocki
On Tuesday, September 10, 2013 05:13:21 PM Mark Brown wrote: > On Tue, Sep 10, 2013 at 05:26:31PM +0300, Mika Westerberg wrote: > > On Tue, Sep 10, 2013 at 01:27:54PM +0100, Mark Brown wrote: > > > > > There is one difference though -- runtime PM is now blocked by default > > > > and > > > > it n

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 05:26:31PM +0300, Mika Westerberg wrote: > On Tue, Sep 10, 2013 at 01:27:54PM +0100, Mark Brown wrote: > > > There is one difference though -- runtime PM is now blocked by default and > > > it needs to be unblocked from the userspace per each device. > > ...as you say. >

Re: [PATCH 2/2] i2c: New bus driver for the QUP I2C controller

2013-09-10 Thread Josh Cartwright
On Tue, Sep 10, 2013 at 06:10:56PM +0300, Ivan T. Ivanov wrote: > On Tue, 2013-09-10 at 08:46 -0500, Josh Cartwright wrote: > > Hey Ivan- > > > > Some nits below. > > > > On Thu, Aug 29, 2013 at 04:27:53PM +0300, Ivan T. Ivanov wrote: [..] > > > +static int qup_i2c_probe(struct platform_device *

Re: [PATCH 1/2] i2c: qup: Add device tree bindings information

2013-09-10 Thread Ivan T. Ivanov
Hi, On Tue, 2013-09-10 at 08:59 -0500, Josh Cartwright wrote: > [Hmm. Fixing b0rked LKML address; that might explain why I am not > seeing Kumar's replies.] > Yes, sorry about this. > On Tue, Sep 10, 2013 at 03:08:57PM +0300, Ivan T. Ivanov wrote: > > Hi Kumar, > > > > On Fri, 2013-08-30 at

Re: [PATCH 2/2] i2c: New bus driver for the QUP I2C controller

2013-09-10 Thread Ivan T. Ivanov
Hi, On Tue, 2013-09-10 at 08:46 -0500, Josh Cartwright wrote: > Hey Ivan- > > Some nits below. > > On Thu, Aug 29, 2013 at 04:27:53PM +0300, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > This bus driver supports the QUP i2c hardware controller in the Qualcomm > > MSM SOCs. The Q

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mika Westerberg
On Tue, Sep 10, 2013 at 01:27:54PM +0100, Mark Brown wrote: > On Tue, Sep 10, 2013 at 10:51:00AM +0300, Mika Westerberg wrote: > > On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > > > > How is this going to interact with client devices which are already > > > enabling runtime PM for t

Re: [PATCH 1/2] i2c: qup: Add device tree bindings information

2013-09-10 Thread Josh Cartwright
[Hmm. Fixing b0rked LKML address; that might explain why I am not seeing Kumar's replies.] On Tue, Sep 10, 2013 at 03:08:57PM +0300, Ivan T. Ivanov wrote: > Hi Kumar, > > On Fri, 2013-08-30 at 10:21 -0500, Kumar Gala wrote: > > On Aug 29, 2013, at 12:26 PM, Ivan T. Ivanov wrote: > > >>> + > > >

Re: [PATCH 2/2] i2c: New bus driver for the QUP I2C controller

2013-09-10 Thread Josh Cartwright
Hey Ivan- Some nits below. On Thu, Aug 29, 2013 at 04:27:53PM +0300, Ivan T. Ivanov wrote: > From: "Ivan T. Ivanov" > > This bus driver supports the QUP i2c hardware controller in the Qualcomm > MSM SOCs. The Qualcomm Universal Peripheral Engine (QUP) is a general > purpose data path engine wi

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mark Brown
On Tue, Sep 10, 2013 at 10:51:00AM +0300, Mika Westerberg wrote: > On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > > How is this going to interact with client devices which are already > > enabling runtime PM for themselves, and what are the advantages of doing > > this over having t

Re: [PATCH 1/2] i2c: qup: Add device tree bindings information

2013-09-10 Thread Ivan T. Ivanov
Hi Kumar, On Fri, 2013-08-30 at 10:21 -0500, Kumar Gala wrote: > On Aug 29, 2013, at 12:26 PM, Ivan T. Ivanov wrote: > >>> + > >>> +Optional properties : > >>> + - Child nodes conforming to i2c bus binding > >>> + - clock-frequency : Desired I2C bus clock frequency in Hz. If > >>> + n

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Rafael J. Wysocki
On Tuesday, September 10, 2013 10:51:00 AM Mika Westerberg wrote: > On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > > On Mon, Sep 09, 2013 at 04:34:38PM +0300, Mika Westerberg wrote: > > > > > + /* > > > + * Enable runtime PM for the client device. If the client wants to > > > + *

Re: [PATCH] i2c: davinci: Fix bad dev_get_platdata() conversion

2013-09-10 Thread Jingoo Han
On Tuesday, September 10, 2013 6:20 PM, Wolfram Sang wrote: > On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote: > > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion > > of this one case: > > > > drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe': >

Re: [PATCH] i2c: davinci: Fix bad dev_get_platdata() conversion

2013-09-10 Thread Wolfram Sang
On Thu, Sep 05, 2013 at 12:23:44PM -0700, Olof Johansson wrote: > commit 6d4028c644e (i2c: use dev_get_platdata()) did a bad conversion > of this one case: > > drivers/i2c/busses/i2c-davinci.c: In function 'davinci_i2c_probe': > drivers/i2c/busses/i2c-davinci.c:665:2: warning: passing argument 1 o

Re: [PATCH RESEND 1/2] i2c: prepare runtime PM support for I2C client devices

2013-09-10 Thread Mika Westerberg
On Mon, Sep 09, 2013 at 04:40:28PM +0100, Mark Brown wrote: > On Mon, Sep 09, 2013 at 04:34:38PM +0300, Mika Westerberg wrote: > > > + /* > > +* Enable runtime PM for the client device. If the client wants to > > +* participate on runtime PM it should call pm_runtime_put() in its > > +