Re: [PATCH 2/2] I2C: OMAP: remove dev-idle, use usage counting provided by runtime PM

2011-08-04 Thread Kevin Hilman
Felipe Balbi ba...@ti.com writes: Hi, On Wed, Aug 03, 2011 at 11:09:20AM -0700, Kevin Hilman wrote: Current usage of runtime PM is not quite correct. The actual idle/unidle of the I2C hardware should not happen until the runtime PM callbacks are called. Therefore, change

Re: [PATCH 2/2] I2C: OMAP: remove dev-idle, use usage counting provided by runtime PM

2011-08-04 Thread Felipe Balbi
Hi, On Thu, Aug 04, 2011 at 07:53:37AM -0700, Kevin Hilman wrote: @@ -1140,6 +1128,36 @@ omap_i2c_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM_RUNTIME +static int omap_i2c_runtime_suspend(struct device *dev) +{ + struct platform_device *pdev =

Re: [PATCH 2/2] I2C: OMAP: remove dev-idle, use usage counting provided by runtime PM

2011-08-04 Thread Kevin Hilman
Felipe Balbi ba...@ti.com writes: Hi, On Thu, Aug 04, 2011 at 07:53:37AM -0700, Kevin Hilman wrote: @@ -1140,6 +1128,36 @@ omap_i2c_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM_RUNTIME +static int omap_i2c_runtime_suspend(struct device *dev) +{ +

[PATCH 2/2] I2C: OMAP: remove dev-idle, use usage counting provided by runtime PM

2011-08-03 Thread Kevin Hilman
Current usage of runtime PM is not quite correct. The actual idle/unidle of the I2C hardware should not happen until the runtime PM callbacks are called. Therefore, change omap_i2c_[un]idle() functions to only be called from the runtime PM callbacks (when usage count transitions to/from zero.)

Re: [PATCH 2/2] I2C: OMAP: remove dev-idle, use usage counting provided by runtime PM

2011-08-03 Thread Felipe Balbi
Hi, On Wed, Aug 03, 2011 at 11:09:20AM -0700, Kevin Hilman wrote: Current usage of runtime PM is not quite correct. The actual idle/unidle of the I2C hardware should not happen until the runtime PM callbacks are called. Therefore, change omap_i2c_[un]idle() functions to only be called from