From b5e6c30a61047e89f6cb1299a81453a80b79cc37 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 24 Dec 2020 00:37:27 -0500 Subject: USB: Reset poweroff timer for all USB events Without this, if a device is left plugged in and idle, unplugging it will trigger an immediate shutdown. Change-Id: I65caaa0c1473562ec5d0bb776b01d4d222d69965 --- firmware/usb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/usb.c') diff --git a/firmware/usb.c b/firmware/usb.c index c27af4a378..05597dff9b 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -41,6 +41,7 @@ #endif #include "logf.h" #include "screendump.h" +#include "powermgmt.h" #ifndef BOOTLOADER #include "misc.h" @@ -436,6 +437,8 @@ static void NORETURN_ATTR usb_thread(void) { queue_wait(&usb_queue, &ev); + reset_poweroff_timer(); /* Any USB event counts */ + switch(ev.id) { /*** Main USB thread duties ***/ -- cgit