diff options
author | Vardan Mikayelyan <mvardan@synopsys.com> | 2018-02-16 13:07:05 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-13 11:47:53 +0300 |
commit | 631a23108c1a90b726ca99f1f90d48a91737f43d (patch) | |
tree | 3df2b6540e9f176dc39e7039038ead534be0de2d /drivers/usb/dwc2/hcd.c | |
parent | 41ba9b9b95beb8bb101a40c6badbbe49da6af9cd (diff) | |
download | linux-631a23108c1a90b726ca99f1f90d48a91737f43d.tar.xz |
usb: dwc2: Add hibernation field into dwc2_hw_params
Add parameter and it's initialization, needed for hibernation.
Reimplement dwc2_set_param_power_down() to support hibernation too.
Now 'power_down' parameter can be initialized with 0, 1 or 2.
0 - No
1 - Partial power down
2 - Hibernation
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/hcd.c')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 280b3d5f0ca7..ee4654b64c7f 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4364,7 +4364,7 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) if (hsotg->op_state == OTG_STATE_B_PERIPHERAL) goto unlock; - if (!hsotg->params.power_down) + if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL) goto skip_power_saving; /* @@ -4419,7 +4419,7 @@ static int _dwc2_hcd_resume(struct usb_hcd *hcd) if (hsotg->lx_state != DWC2_L2) goto unlock; - if (!hsotg->params.power_down) { + if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL) { hsotg->lx_state = DWC2_L0; goto unlock; } |