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

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 02:34:21PM -0700, Kevin Hilman wrote: > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > index f32ca29..44374b4 100644 > > --- a/drivers/i2c/i2c-core.c > > +++ b/drivers/i2c/i2c-core.c > > @@ -248,11 +248,30 @@ static int i2c_device_probe(struct device *dev

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

2013-09-12 Thread Aaron Lu
On 09/13/2013 06:06 AM, Sylwester Nawrocki wrote: > On 09/11/2013 05:32 PM, Mika Westerberg wrote: >> From: Aaron Lu >> >> This patch adds runtime PM support for the I2C bus in a similar way that >> has been done for PCI bus already. This means that the I2C bus core >> prepares runtime PM for a cli

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

2013-09-12 Thread Sylwester Nawrocki
On 09/11/2013 05:32 PM, Mika Westerberg wrote: From: Aaron Lu This patch adds runtime PM support for the I2C bus in a similar way that has been done for PCI bus already. This means that the I2C bus core prepares runtime PM for a client device just before a driver is about to be bound to it. Devi

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

2013-09-12 Thread Mark Brown
On Thu, Sep 12, 2013 at 02:07:48PM -0700, Kevin Hilman wrote: > IMO, this decision belongs to the PM domain, not to the core. We have > an established legacy with the current core default (auto) and changing > that means lots of breakage. Yup. > The "forbid by default" can just as easily be han

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

2013-09-12 Thread Kevin Hilman
On Thu, Sep 12, 2013 at 2:34 PM, Kevin Hilman wrote: > Mika Westerberg writes: > >> From: Aaron Lu >> >> This patch adds runtime PM support for the I2C bus in a similar way that >> has been done for PCI bus already. This means that the I2C bus core >> prepares runtime PM for a client device just

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

2013-09-12 Thread Kevin Hilman
Mika Westerberg writes: > From: Aaron Lu > > This patch adds runtime PM support for the I2C bus in a similar way that > has been done for PCI bus already. This means that the I2C bus core > prepares runtime PM for a client device just before a driver is about to be > bound to it. Devices that ar

Re: [PATCH v2 5/9] drivers/misc: convert existing I2C clients driver to use I2C core runtime PM

2013-09-12 Thread Greg Kroah-Hartman
On Wed, Sep 11, 2013 at 06:32:36PM +0300, Mika Westerberg wrote: > The I2C core now prepares runtime PM on behalf of the I2C client device, so > only thing the driver needs to do is to call pm_runtime_put() at the end of > its ->probe(). > > This patch converts I2C client drivers under drivers/mis

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

2013-09-12 Thread Kevin Hilman
Aaron Lu writes: > 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 m

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

2013-09-12 Thread Mark Rutland
On Thu, Aug 29, 2013 at 02:27:52PM +0100, Ivan T. Ivanov wrote: > From: "Ivan T. Ivanov" > > The Qualcomm Universal Peripherial (QUP) wraps I2C mini-core and > provide input and output FIFO's for it. I2C controller can operate > as master with supported bus speeds of 100Kbps and 400Kbps. > > Sig

[PATCH v2 1/5] i2c: rcar: (cosmetic) remove superfluous parenthesis

2013-09-12 Thread Guennadi Liakhovetski
A recent patch added even more superfluous parenthesis to those, which already were there. Remove them again. Signed-off-by: Guennadi Liakhovetski --- drivers/i2c/busses/i2c-rcar.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i

[PATCH v2 4/5] i2c: rcar: fix clk_get() error handling

2013-09-12 Thread Guennadi Liakhovetski
When clk_get() fails, it returns an error code, not a NULL. This patch fixes such an error handling bug. Signed-off-by: Guennadi Liakhovetski --- drivers/i2c/busses/i2c-rcar.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2

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

2013-09-12 Thread Guennadi Liakhovetski
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 is used, suitable clocks are available for the I2C controllers, that are children of

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

2013-09-12 Thread Guennadi Liakhovetski
This patch adds Device Tree support to the i2c-rcar driver and respective documentation. Signed-off-by: Guennadi Liakhovetski --- v2: change compatibility string to the common - format Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 22 drivers/i2c/busses/i2c-rcar.c

[PATCH v2 0/5] i2c: rcar: Device Tree support and clock improvements

2013-09-12 Thread Guennadi Liakhovetski
Device Tree support for i2c-rcar isn't too complex, only usual or standard properties are used. Apart from it several clock handling improvements are included in this patch series. Developed on top of -next of 12.09.2013 v2: only DT compatibility strings have been changed. Cc: Guennadi Liakhovet

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

2013-09-12 Thread Guennadi Liakhovetski
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, could also be replaced, but that would get more complicated. Signed-off-by: Guennadi Li

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 01:04:55PM +0200, Rafael J. Wysocki wrote: > On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > > > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > > > > On Wed, Sep 11, 2013

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 01:04:28PM +0200, Wolfram Sang wrote: > On Thu, Sep 12, 2013 at 01:04:55PM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > > > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > > > > On Thu, Sep 12, 2013 at

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Wolfram Sang
On Thu, Sep 12, 2013 at 01:04:55PM +0200, Rafael J. Wysocki wrote: > On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > > > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > > > > On Wed, Sep 11, 2013

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Rafael J. Wysocki
On Thursday, September 12, 2013 12:43:02 PM Mika Westerberg wrote: > On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > > > On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > > > > > > I would be able to hav

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Thu, Sep 12, 2013 at 10:31:45AM +0100, Mark Brown wrote: > On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > > On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > > > > I would be able to have this and the other patch in the SPI tree in case > > > it overlaps with oth

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mark Brown
On Thu, Sep 12, 2013 at 12:27:43PM +0300, Mika Westerberg wrote: > On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > > I would be able to have this and the other patch in the SPI tree in case > > it overlaps with other work - I'm not sure what the plan will be for > > merging this stuf

Re: [PATCH v2 6/9] mfd: wm8994: convert to use I2C core runtime PM

2013-09-12 Thread Samuel Ortiz
On Thu, Sep 12, 2013 at 12:24:47PM +0300, Mika Westerberg wrote: > On Wed, Sep 11, 2013 at 06:12:43PM +0200, Samuel Ortiz wrote: > > I think it would make more sense for you to merge that one together with > > the related i2c changes. If you prefer that I take it through MFD, > > please let me know

Re: [PATCH v2 8/9] spi: prepare runtime PM support for SPI devices

2013-09-12 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 04:51:20PM +0100, Mark Brown wrote: > On Wed, Sep 11, 2013 at 06:32:39PM +0300, Mika Westerberg wrote: > > This patch adds runtime PM support for the SPI bus analogous to what has > > been done for the I2C bus. This means that the SPI core prepares runtime PM > > for a clien

Re: [PATCH v2 6/9] mfd: wm8994: convert to use I2C core runtime PM

2013-09-12 Thread Mika Westerberg
On Wed, Sep 11, 2013 at 06:12:43PM +0200, Samuel Ortiz wrote: > Hi Mika, > > On Wed, Sep 11, 2013 at 06:32:37PM +0300, Mika Westerberg wrote: > > The I2C core now prepares runtime PM on behalf of the I2C client device, so > > only thing the driver needs to do is to call pm_runtime_put() at the end