Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-15 Thread Russell King - ARM Linux
On Tue, Oct 15, 2013 at 10:18:15AM +0800, Peter Chen wrote: > So, the lessons for this topic are: > > - If one atomic variable's operation only includes one instruction like > atomic_read and atomic_set, it is not meaningful for using atomic > operation, we can just use bool instead of it. The le

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Peter Chen
On Mon, Oct 14, 2013 at 12:01:08PM +0100, Russell King - ARM Linux wrote: > On Sat, Oct 12, 2013 at 05:35:03PM +0800, Peter Chen wrote: > > This commit adds runtime and system power management support for > > chipidea core. The runtime pm support is controlled by glue > > layer, it can be enabled b

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Russell King - ARM Linux
On Sat, Oct 12, 2013 at 05:35:03PM +0800, Peter Chen wrote: > This commit adds runtime and system power management support for > chipidea core. The runtime pm support is controlled by glue > layer, it can be enabled by flag CI_HDRC_SUPPORTS_RUNTIME_PM. Let's look at the locking. 1. Runtime PM. T

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Russell King - ARM Linux
On Mon, Oct 14, 2013 at 05:04:21PM +0800, Peter Chen wrote: > It is for ARM, but for other platforms, it may not. Wrong. atomic_read() and atomic_set() are defined the same way and have the same lack of atomicity across all architectures. There is nothing special about these over a standard load

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Russell King - ARM Linux
On Mon, Oct 14, 2013 at 03:55:48PM +0800, Peter Chen wrote: > On Mon, Oct 14, 2013 at 10:04:58AM +0200, Lothar Waßmann wrote: > > Hi, > > > > Peter Chen wrote: > > > This commit adds runtime and system power management support for > > > chipidea core. The runtime pm support is controlled by glue >

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Sascha Hauer
On Mon, Oct 14, 2013 at 05:04:21PM +0800, Peter Chen wrote: > On Mon, Oct 14, 2013 at 10:42:16AM +0200, Sascha Hauer wrote: > > On Mon, Oct 14, 2013 at 03:55:48PM +0800, Peter Chen wrote: > > > On Mon, Oct 14, 2013 at 10:04:58AM +0200, Lothar Waßmann wrote: > > > > Hi, > > > > > > > > Peter Chen w

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Peter Chen
On Mon, Oct 14, 2013 at 10:42:16AM +0200, Sascha Hauer wrote: > On Mon, Oct 14, 2013 at 03:55:48PM +0800, Peter Chen wrote: > > On Mon, Oct 14, 2013 at 10:04:58AM +0200, Lothar Waßmann wrote: > > > Hi, > > > > > > Peter Chen wrote: > > > > This commit adds runtime and system power management suppo

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Sascha Hauer
On Mon, Oct 14, 2013 at 03:55:48PM +0800, Peter Chen wrote: > On Mon, Oct 14, 2013 at 10:04:58AM +0200, Lothar Waßmann wrote: > > Hi, > > > > Peter Chen wrote: > > > This commit adds runtime and system power management support for > > > chipidea core. The runtime pm support is controlled by glue >

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Peter Chen
On Mon, Oct 14, 2013 at 10:04:58AM +0200, Lothar Waßmann wrote: > Hi, > > Peter Chen wrote: > > This commit adds runtime and system power management support for > > chipidea core. The runtime pm support is controlled by glue > > layer, it can be enabled by flag CI_HDRC_SUPPORTS_RUNTIME_PM. > > >

Re: [PATCH 01/11] usb: chipidea: Add power management support

2013-10-14 Thread Lothar Waßmann
Hi, Peter Chen wrote: > This commit adds runtime and system power management support for > chipidea core. The runtime pm support is controlled by glue > layer, it can be enabled by flag CI_HDRC_SUPPORTS_RUNTIME_PM. > [...] > +#ifdef CONFIG_PM > +static int ci_controller_suspend(struct device *dev