OSDN Git Service

usb: gadget: aspeed: Rework the reset logic
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 26 Jul 2019 05:05:35 +0000 (15:05 +1000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Aug 2019 05:54:49 +0000 (08:54 +0300)
commit5f0625aaba5e4c0db75e942ff3c76516465a77d9
tree300a1439496631227cb9e8d9d7518a0e898e16b5
parent155940a16d688b5376f7c955a5f53259c6fe5689
usb: gadget: aspeed: Rework the reset logic

We had some dodgy code using the speed setting to decide whether a
port reset would reset the device or just enable it.

Instead, if the device is disabled and has a gadget attached, a
reset will enable it. If it's already enabled, a reset will
reset it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/aspeed-vhub/dev.c