summaryrefslogtreecommitdiff
path: root/include/usb_charge.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-05-02 17:58:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-23 02:14:13 -0700
commit437f541fab07d2b96e873187bba9a5a79529f58e (patch)
tree1334e388312be3d666b1db1412fcc4fd8015b63f /include/usb_charge.h
parentddba0154f7c919144b1b0013ac0c6b172667822a (diff)
downloadchrome-ec-437f541fab07d2b96e873187bba9a5a79529f58e.tar.gz
PI3USB9281: Serialize mux setting and BC12 detection
Currently a PD task and a USB charger task can talk to PI3USB9281 to update mux setting and to get BC12 information interleavingly. We suspect this causes unreliable BC12 detection including detach detection. This patch makes the usb_charger_set_switches API schedule a mux update instead of changing the mux setting by itself wakes up a USB charger task. A USB charger task solely handles BC12 detection and mux setting. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b/125176293 BRANCH=nami TEST=Verify BC1.2 and PD charger can be detected correctly and power_supply_info prints 'Discharging' when they're disconnected on Syndra. Change-Id: Iadaf9087be74a4ba0412dd08b95a40eac4e69ce1 Reviewed-on: https://chromium-review.googlesource.com/1622293 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h
index 46ba725b95..6b83a1c52f 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -55,6 +55,7 @@ int usb_charge_set_mode(int usb_port_id, enum usb_charge_mode mode,
#define USB_CHG_EVENT_DR_UFP TASK_EVENT_CUSTOM_BIT(3)
#define USB_CHG_EVENT_DR_DFP TASK_EVENT_CUSTOM_BIT(4)
#define USB_CHG_EVENT_CC_OPEN TASK_EVENT_CUSTOM_BIT(5)
+#define USB_CHG_EVENT_MUX TASK_EVENT_CUSTOM_BIT(6)
#endif
/*