driver: usb: nordic: Enable USB DC when VBUS is Hi

We want to enable USB DC at not only VBUS detection event
but also it has been already high.

Signed-off-by: Takumi Ando <takumi.ando@atmark-techno.com>
This commit is contained in:
Takumi Ando 2019-03-25 19:39:26 +09:00 committed by Carles Cufí
commit bdde5fd984

View file

@ -1316,6 +1316,10 @@ int usb_dc_attach(void)
usbd_work_schedule();
}
if (nrf_power_usbregstatus_vbusdet_get()) {
usb_dc_nrfx_power_event_callback(NRF_POWER_EVENT_USBDETECTED);
}
return ret;
}