Re: [PATCH v2 2/9] usb: cdns3: add runtime PM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter,
On Sun, 2020-05-24 at 07:22 +0800, Peter Chen wrote:
> Introduce runtime PM and wakeup interrupt handler for cdns3,
> the runtime PM is default off since other cdns3 has not implemented
> glue layer support for runtime PM.
> 
> When the controller is in low power mode, the lpm flag will be set.
> The interrupt triggered later than lpm flag is set considers as
> wakeup interrupt and handled at cdns_drd_irq. 
Wonder to know that CPUs may be powered off in this case? 
Do you consider the case when usb controller is in low power mode, and
also power off CPUs, then how to wakeup usb controller?

Thanks

> Once the wakeup
> occurs, it first disables interrupt to avoid later interrupt
> occurrence since the controller is in low power mode at that
> time, and access registers may be invalid at that time. At wakeup
> handler, it will call pm_runtime_get to wakeup controller, and
> at runtime resume handler, it will enable interrupt again.
> 
> The API platform_suspend is introduced for glue layer to implement
> platform specific PM sequence.
> 
> Signed-off-by: Peter Chen <peter.chen@xxxxxxx>
> ---
>  drivers/usb/cdns3/core.c   | 119 +++++++++++++++++++++++++++++++------
>  drivers/usb/cdns3/core.h   |  14 +++++
>  drivers/usb/cdns3/drd.c    |   7 +++
>  drivers/usb/cdns3/gadget.c |   4 ++
>  drivers/usb/cdns3/host.c   |   7 +++
>  5 files changed, 134 insertions(+), 17 deletions(-)





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux