Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Alan Stern
On Sat, 19 Dec 2015, Wolfram Sang wrote:

> Asking linux-pm for help here: If we want to support RuntimePM for I2C
> clients, do we need to enable RuntimePM on the logical I2C adapter
> device (the bus master) which is already marked using
> pm_runtime_no_callbacks?

In theory you don't need to.  But there are some advantages if you do: 
You get automatic runtime PM time accounting for the adapter device 
(how much time active and how much suspended), and suspend events will 
propagate from the I2C clients all the way up to the adapter's parent.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang

> > Asking linux-pm for help here: If we want to support RuntimePM for I2C
> > clients, do we need to enable RuntimePM on the logical I2C adapter
> > device (the bus master) which is already marked using
> > pm_runtime_no_callbacks?
> 
> In theory you don't need to.  But there are some advantages if you do: 
> You get automatic runtime PM time accounting for the adapter device 
> (how much time active and how much suspended), and suspend events will 
> propagate from the I2C clients all the way up to the adapter's parent.

That's exactly what I want. Thank you very much!



signature.asc
Description: PGP signature


[PULL REQUEST] i2c for 4.4

2015-12-19 Thread Wolfram Sang
Linus,

here is a set of "usual" driver bugfixes for the I2C subsystem. Please
pull.

Thanks,

   Wolfram


The following changes since commit 1ec218373b8ebda821aec00bb156a9c94fad9cd4:

  Linux 4.4-rc2 (2015-11-22 16:45:59 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-current

for you to fetch changes up to b4cd08aa1f53c831e67dc5c6bc9f9acff27abcba:

  i2c: rcar: disable runtime PM correctly in slave mode (2015-12-19 12:00:37 
+0100)


Alexander Sverdlin (1):
  i2c: davinci: Increase module clock frequency

Dmitry V. Krivenok (1):
  i2c: do not use 0x in front of %pa

Gao Pan (1):
  i2c: imx: init bus recovery info before adding i2c adapter

Hans de Goede (1):
  i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

Jarkko Nikula (1):
  i2c: designware: Keep pm_runtime_enable/_disable calls in sync

Wolfram Sang (2):
  i2c: rk3x: populate correct variable for sda_falling_time
  i2c: rcar: disable runtime PM correctly in slave mode

Xiangliang Yu (1):
  i2c: designware: fix IO timeout issue for AMD controller

 drivers/i2c/busses/i2c-davinci.c| 11 +--
 drivers/i2c/busses/i2c-designware-core.c|  6 ++
 drivers/i2c/busses/i2c-designware-core.h|  1 +
 drivers/i2c/busses/i2c-designware-platdrv.c | 16 ++--
 drivers/i2c/busses/i2c-imx.c|  4 ++--
 drivers/i2c/busses/i2c-mv64xxx.c| 27 ++-
 drivers/i2c/busses/i2c-rcar.c   |  4 ++--
 drivers/i2c/busses/i2c-rk3x.c   |  2 +-
 drivers/i2c/busses/i2c-st.c |  2 +-
 9 files changed, 50 insertions(+), 23 deletions(-)


signature.asc
Description: Digital signature


Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang
Hi,

> > Since commit 6ada5c1e1b077a ("i2c: Mark adapter devices with
> > pm_runtime_no_callbacks"), runtime PM on adapters turned into a no-op.
> > So, we can remove these calls.
> 
> Won't this break i2c client devices that use runtime PM? Not sure
> if any cases of such client exist now, I'll try to find some time
> to test this change.

Thanks, much appreciated.

> IIRC client's pm_runtime* calls return error if their parent device's
> runtime PM is not enabled. Also enabling runtime PM on the i2c adapter
> allows propagating runtime PM calls up to its parent - the i2c
> controller platform device.

I was thinking the PM core would take care of that. Grepping for
other users of pm_runtime_no_callbacks(), I see that most but not all
use pm_runtime_enable() on the device, too.

Asking linux-pm for help here: If we want to support RuntimePM for I2C
clients, do we need to enable RuntimePM on the logical I2C adapter
device (the bus master) which is already marked using
pm_runtime_no_callbacks?

> Perhaps we could just enable/disable adapter's runtime PM in i2c core.

That would be the proper place to do it, as I see it.

Thanks,

   Wolfram



signature.asc
Description: Digital signature


Re: [PATCH] i2c: s3c2410: remove superfluous runtime PM calls

2015-12-19 Thread Wolfram Sang
On Thu, Dec 17, 2015 at 09:46:55AM +, Charles Keepax wrote:
> On Wed, Dec 16, 2015 at 02:53:07PM +0100, Sylwester Nawrocki wrote:
> > On 15/12/15 19:14, Wolfram Sang wrote:
> > > Since commit 6ada5c1e1b077a ("i2c: Mark adapter devices with
> > > pm_runtime_no_callbacks"), runtime PM on adapters turned into a no-op.
> > > So, we can remove these calls.
> > 
> > Won't this break i2c client devices that use runtime PM? Not sure
> > if any cases of such client exist now, I'll try to find some time
> > to test this change.
> > 
> 
> Our CODECs can be controlled over I2C and use runtime PM.
> However, this change doesn't seem to have any adverse effect on
> them that I can find.
> 
> Tested-by: Charles Keepax 

Thanks for testing!



signature.asc
Description: Digital signature