summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorJohn Youn <johnyoun@synopsys.com>2018-01-24 16:44:51 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-03-13 11:47:53 +0300
commit7455f8b7f0b3f3409f50e52ae6fd23fbd1a611dd (patch)
tree7d1efa3e480fe5f17a040dd420824c9b9a9528df /drivers/usb/dwc2
parentf09cc79b4b338e3bb60370f5443f475d2248bcca (diff)
downloadlinux-7455f8b7f0b3f3409f50e52ae6fd23fbd1a611dd.tar.xz
usb: dwc2: Enable LPM
Set 'lpm_capable' flag in the gadget structure so indicating that LPM is supported. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Sevak Arakelyan <sevaka@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')
-rw-r--r--drivers/usb/dwc2/gadget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 5d91ff948972..adf162cb9998 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -4624,6 +4624,10 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
hsotg->gadget.max_speed = USB_SPEED_HIGH;
hsotg->gadget.ops = &dwc2_hsotg_gadget_ops;
hsotg->gadget.name = dev_name(dev);
+
+ if (hsotg->params.lpm)
+ hsotg->gadget.lpm_capable = true;
+
if (hsotg->dr_mode == USB_DR_MODE_OTG)
hsotg->gadget.is_otg = 1;
else if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)