usb: dwc3: Support option to disable USB2 LPM
PATCH 3/3 usb: dwc3: Support option to disable USB2 LPM
Thinh,
Quoted 31 lines · Thinh Nguyen
Hi Roger,
Quoted 13 lines · Roger Quadros
Hi,
Quoted 10 lines · Thinh Nguyen
Support the option to disable USB2 LPM. Set xhci "usb2-lpm-disable" property via "snps,usb2-lpm-disable" property.
Signed-off-by Thinh Nguyen <[email protected]>--- drivers/usb/dwc3/core.c | 2 ++ drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/host.c | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-)Quoted 14 lines
drivers/usb/dwc3/core.c static void dwc3_get_properties(struct dwc3 *dwc) · line 1252
Quoted 10 lines
drivers/usb/dwc3/core.c +2
-0@@ -1248,6 +1248,8 @@ static void dwc3_get_properties(struct dwc3 *dwc) &hird_threshold); dwc->usb3_lpm_capable =device_property_read_bool (dev,"snps,usb3_lpm_capable" ); + dwc->usb2_lpm_disable =device_property_read_bool (dev, +"snps,usb2-lpm-disable" );Can we use the same logic as
usb3_lpminstead?
i.e. enable USB2 LPM only if "snps,usb2_lpm_capable" is present in DT. This is because older platforms that are not tested for usb2 lpm might break if you enable it by default.
Quoted 3 lines
I follow the same logic as usb-xhci property. The usb2-lpm-disable property from xHCI has been around for awhile. Do you suggest to change the property for xHCI then?
No.
I see it now that you are just setting the XHCI property and not doing any change in the dwc3 functionality itself.
I think your patch is correct.
Quoted 4 lines
Quoted 1 line
Also can we have some consistency in usage of '-' vs '_'?
Right.. I agree. I've been using '-' as it is the preferred syntax as most of the properties, but some old properties use '_'. Do you have any suggestion?
I'd keep it consistent to "snps,usb3_lpm_capable" so we avoid mistakes when writing the DT.
Felipe?
cheers,
-roger