Skip to content

Commit 37705bc

Browse files
tmon-nordiccarlescufi
authored andcommitted
driver: usb_dc_sam_usbhs: Actually set detach bit
Device physically detaches when the DETACH bit is set. Fix the assignment to actually set the bit instead of clearing it. Signed-off-by: Tomasz Moń <[email protected]>
1 parent b867f0e commit 37705bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/device/usb_dc_sam_usbhs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ int usb_dc_attach(void)
348348
int usb_dc_detach(void)
349349
{
350350
/* Detach the device */
351-
USBHS->USBHS_DEVCTRL &= ~USBHS_DEVCTRL_DETACH;
351+
USBHS->USBHS_DEVCTRL |= USBHS_DEVCTRL_DETACH;
352352

353353
/* Disable the USB clock */
354354
usb_dc_disable_clock();

0 commit comments

Comments
 (0)