Skip to content

Commit ae8ae4c

Browse files
jfischer-nokartben
authored andcommitted
drivers: uhc_virtual: update SoF timer based on the bus speed
Update the SoF timer based on the bus speed of the connected device. Signed-off-by: Johann Fischer <[email protected]>
1 parent 2ff20a8 commit ae8ae4c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/uhc/uhc_virtual.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ static void sof_timer_handler(struct k_timer *timer)
448448
static void vrt_device_act(const struct device *dev,
449449
const enum uvb_device_act act)
450450
{
451+
struct uhc_vrt_data *priv = uhc_get_private(dev);
451452
enum uhc_event_type type;
452453

453454
switch (act) {
@@ -456,9 +457,11 @@ static void vrt_device_act(const struct device *dev,
456457
break;
457458
case UVB_DEVICE_ACT_FS:
458459
type = UHC_EVT_DEV_CONNECTED_FS;
460+
k_timer_start(&priv->sof_timer, K_MSEC(1), K_MSEC(1));
459461
break;
460462
case UVB_DEVICE_ACT_HS:
461463
type = UHC_EVT_DEV_CONNECTED_HS;
464+
k_timer_start(&priv->sof_timer, K_MSEC(1), K_USEC(125));
462465
break;
463466
case UVB_DEVICE_ACT_REMOVED:
464467
type = UHC_EVT_DEV_REMOVED;

0 commit comments

Comments
 (0)