usb: dwc3: Support option to disable USB2 LPM
PATCH 3/3 usb: dwc3: Support option to disable USB2 LPM
Hi,
Quoted 24 lines · Oliver Neukum
Quoted 24 lines
Quoted 23 lines
Quoted 11 lines
drivers/usb/dwc3/core.h +1
-0@@ -971,6 +971,7 @@ struct dwc3_scratchpad_array {* @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround * @three_stage_setup: set if we perform a three phase setup * @usb3_lpm_capable: set if hadrware supports Link Power Management +* @usb2_lpm_disable: set to disable usb2 lpm * @disable_scramble_quirk: set if we enable the disable scramble quirk * @u2exit_lfps_quirk: set if we enable u2exit lfps quirk * @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk drivers/usb/dwc3/core.h struct dwc3 { · line 1150
Quoted 4 lines
drivers/usb/dwc3/core.h +1
-0@@ -1146,6 +1147,7 @@ struct dwc3 { unsigned setup_packet_pending:1; unsigned three_stage_setup:1; unsigned usb3_lpm_capable:1; + unsigned usb2_lpm_disable:1;Hi,
that may be a bit late, but why would this be a property of dwc3? Now, you may want to do this for a specific controller, but there is no reason to limit the flag to dwc3. We want this flag in the generic HCD attributes, so that other HCDs can share it. Maybe even expose it to sysfs.
Quoted 6 lines
Quoted 1 line
this is used for the peripheral side of dwc3 too.
same argument. Whether a gadget supports LPM is a question in no way specific to dwc3. And whether this exposes internal registers does not really matter. It is a capability of the HC for a generic issue.
for the gadget api we don't have enough UDCs supporting LPM to design a proper generic api. Until then, it's best to keep this private to the driver otherwise we may make the wrong decisions in the generic layer.