From 3a89fdee96eadda10a6024bd1162fae696654ae6 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 2 Oct 2021 11:53:20 +0100 Subject: x1000: fix hang that may occur in USB mode Upon getting a USB reset, the USB core will update charging current by calling usb_charging_maxcurrent_change(). On all current X1000 targets this may cause a hang, since changing the charge current involves a blocking I2C transaction. Eg. if the host issues a reset when we're already configured as part of error recovery, the change from 500 mA -> 100 mA will cause a hang. Change-Id: I5b45272c01fa16b179ae3d16bbc50c7fab9a416b --- firmware/export/config/fiiom3k.h | 1 + 1 file changed, 1 insertion(+) (limited to 'firmware/export/config/fiiom3k.h') diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h index dc56f0a5cc..5a2fa6c025 100644 --- a/firmware/export/config/fiiom3k.h +++ b/firmware/export/config/fiiom3k.h @@ -114,6 +114,7 @@ #define USB_DEVBSS_ATTR __attribute__((aligned(32))) #define HAVE_USB_POWER #define HAVE_USB_CHARGING_ENABLE +#define HAVE_USB_CHARGING_IN_THREAD #define TARGET_USB_CHARGING_DEFAULT USB_CHARGING_FORCE #define HAVE_BOOTLOADER_USB_MODE #endif -- cgit v1.2.3