From: John Youn <johny...@synopsys.com>

Set 'lpm_capable' flag in the gadget structure so
indicating that LPM is supported.

Signed-off-by: Sevak Arakelyan <sev...@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 487397d571a8..6e032f6d8c07 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -4652,6 +4652,9 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
        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)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to