usb: dwc2: Implement set_selfpowered()
authorJohn Keeping <john@metanate.com>
Tue, 4 Feb 2020 15:29:33 +0000 (15:29 +0000)
committerFelipe Balbi <balbi@kernel.org>
Sun, 15 Mar 2020 09:34:17 +0000 (11:34 +0200)
commit1a0808cb9e417170ed6ab97254cf319dc3e3c310
tree4f244c190c7d9eea2305f7f9347a181fe828c72b
parent201c26c08db4bafde361ace54d74eac5d69fb66a
usb: dwc2: Implement set_selfpowered()

dwc2 always reports as self-powered in response to a device status
request.  Implement the set_selfpowered() operations so that the gadget
can report as bus-powered when appropriate.

This is modelled on the dwc3 implementation.

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc2/gadget.c