summaryrefslogtreecommitdiff
path: root/include/usb_charge.h
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2022-05-16 16:11:35 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-27 15:55:42 +0000
commit2024fc296cc799f75ab1ca502e73e09b6488269a (patch)
tree0a12f20f19820dc6e7d13c695c05362b0e1ef0c4 /include/usb_charge.h
parent5762329719d76c23d395c3816ed503597c4f6cc7 (diff)
downloadchrome-ec-2024fc296cc799f75ab1ca502e73e09b6488269a.tar.gz
usbc: wrap task_set_event to have an explicit port argument
Define an explicit function to set events for the usb charger tasks, so that the caller is not coupled to the internal task implementation, and we can use a single task on a later patch. BRANCH=none BUG=b:226411332 TEST=make buildall TEST=zmake testall TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I7a1223642b800568bf4f9864f75b2b647c84d29f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663746 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h
index a28e736efa..25fcb74314 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -167,6 +167,14 @@ static inline int usb_charger_ramp_max(int port, int supplier, int sup_curr)
}
/**
+ * Set a task event for a specific usb charger port
+ *
+ * @param port port number
+ * @param event event bits (USB_CHG_EVENT_*)
+ */
+uint32_t usb_charger_task_set_event(int port, uint32_t event);
+
+/**
* Reset available BC 1.2 chargers on all ports
*
* @param port