]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: gadget: dwc2_udc_otg: implement pullup()
authorMattijs Korpershoek <mkorpershoek@baylibre.com>
Wed, 11 Jan 2023 08:19:27 +0000 (09:19 +0100)
committerMarek Vasut <marex@denx.de>
Sat, 14 Jan 2023 13:10:30 +0000 (14:10 +0100)
commit2383e8f4aec7a5087526d501478c4ba8235da2b4
treef1746b715fc024bbc76d9197c89bc9a3e0dab193
parent66b5847b30a94487b6a540736dc4b10422d71294
usb: gadget: dwc2_udc_otg: implement pullup()

Pullup is used by the usb framework in order to do software-controlled
usb_gadget_connect() and usb_gadget_disconnect().

Implement pullup() for dwc2 using the SOFT_DISCONNECT bit in the dctl
register:
* when pullup is on, clear SOFT_DISCONNECT
* when pullup is off, set SOFT_DISCONNECT

This is especially useful when a gadget disconnection is initiated but
no board_usb_cleanup() is called.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
drivers/usb/gadget/dwc2_udc_otg.c