On Do, 2018-11-08 at 12:47 +0200, Felipe Balbi wrote: Hi, > Oliver Neukum <oneukum@xxxxxxxx> writes: > > On Mi, 2018-11-07 at 18:10 -0800, Thinh Nguyen wrote: > > > > > > --- a/drivers/usb/dwc3/core.h > > > +++ b/drivers/usb/dwc3/core.h > > > @@ -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 > > > @@ -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. > > 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. Regards Oliver