lkml.org 
[lkml]   [2018]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume
From
Date
hi,
On Tue, 2018-10-30 at 18:30 -0400, Alan Cooper wrote:
> On 10/17/18 9:46 PM, Chunfeng Yun wrote:> hi,
> >
> > On Wed, 2018-10-17 at 18:29 -0400, Al Cooper wrote:
> >> Add the ability to skip calling the PHY's exit routine on suspend
> >> and the PHY's init routine on resume. This is to handle a USB PHY
> >> that should have it's power_off function called on suspend but
> cannot
> >> have it's exit function called because on exit it will disable the
> >> PHY to the point where register accesses to the Host Controllers
> >> using the PHY will be disabled and the host drivers will crash.
> >>
> >> This is enabled with the HCD flag "suspend_without_phy_exit" which
> >> can be set from any HCD driver.
> >>
> >> Signed-off-by: Al Cooper<alcooperx@gmail.com>
> >> ---
> >> drivers/usb/core/hcd.c | 8 ++++----
> >> drivers/usb/core/phy.c | 18 ++++++++++++------
> >> drivers/usb/core/phy.h | 9 ++++++---
> >> include/linux/usb/hcd.h | 3 +++
> >> 4 files changed, 25 insertions(+), 13 deletions(-)
> >>


> >> unsigned skip_phy_initialization:1;
> >>
> >> + /* Some phys don't want the phy's exit/init called on
> suspend/resume */
> >> + unsigned suspend_without_phy_exit:1;
> > As suggested before, you can skip phy's exit/init during
> suspend/resume
> > by enabling wakeup of hcd, so needn't add a new variable for it.
>
> I still need to be able to enable and disable wakeup for this driver.
Just use device_init_wakeup(dev, true) instead of
device_wakeup_enable(dev) for your controller driver, you can try it.

Sorry for the late replay
>
> >
> >> +
> >> /* The next flag is a stopgap, to be removed when all the
> HCDs
> >> * support the new root-hub polling mechanism. */
> >> unsigned uses_new_polling:1;
> >


\
 
 \ /
  Last update: 2018-11-08 02:45    [W:0.052 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site