Re: [PATCH v2] usb: gadget: dwc2_udc_otg: implement pullup()

2023-01-11 Thread Mattijs Korpershoek
On Tue, Jan 10, 2023 at 18:23, Marek Vasut wrote: > On 1/10/23 17:29, Mattijs Korpershoek wrote: > > [...] > >> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c >> b/drivers/usb/gadget/dwc2_udc_otg.c >> index 77988f78ab30..d0a9be49ad9c 100644 >> --- a/drivers/usb/gadget/dwc2_udc_otg.c >> +++ b/dri

Re: [PATCH v2] usb: gadget: dwc2_udc_otg: implement pullup()

2023-01-10 Thread Marek Vasut
On 1/10/23 17:29, Mattijs Korpershoek wrote: [...] diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 77988f78ab30..d0a9be49ad9c 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -236,6 +236,14 @@ static int udc_enab

[PATCH v2] usb: gadget: dwc2_udc_otg: implement pullup()

2023-01-10 Thread Mattijs Korpershoek
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 of, set SOFT_DISCONNECT This is espe