summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.tasks
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-07 13:04:17 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-09 05:11:02 +0000
commitf366e0c5db6621684dd042a104d83162731cba04 (patch)
treef27fe44d843aaa6821993ef9d52627edce7a7dfc /zephyr/Kconfig.tasks
parentb1b5659062f4ba8ff7de2df4dcebd339084a90e6 (diff)
downloadchrome-ec-f366e0c5db6621684dd042a104d83162731cba04.tar.gz
zephyr: Add the USB charger tasks
Add these tasks so that we can enable USB charging. For now it is left off since the driver is missing. Move the charger task to the top so that things are in alphabetical order. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr Change-Id: Ib1f48438a2b33069624beb2cd9330db475f76333 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615620 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.tasks')
-rw-r--r--zephyr/Kconfig.tasks41
1 files changed, 41 insertions, 0 deletions
diff --git a/zephyr/Kconfig.tasks b/zephyr/Kconfig.tasks
index 766ffa4b21..8bc93b7a3a 100644
--- a/zephyr/Kconfig.tasks
+++ b/zephyr/Kconfig.tasks
@@ -125,4 +125,45 @@ config TASK_POWERBTN_STACK_SIZE
endif # HAS_TASK_POWERBTN
+config HAS_TASK_USB_CHG_P0
+ bool "USB Charger (port 0)"
+ depends on PLATFORM_EC_USB_CHARGER
+ help
+ This turns on the USB charger task for port 0. This handles
+ negotiating power from an attached charger, trying to get the maximum
+ available power consistent with the needs of the device.
+
+ There is one of these tasks for each USB-C port on the device.
+
+if HAS_TASK_USB_CHG_P0
+
+config TASK_USB_CHG_STACK_SIZE
+ hex "(all ports) task stack size"
+ default 0x400 # EC uses VENTI_TASK_STACK_SIZE which is 896
+ help
+ The stack size of the USB charger task. If there are multiple tasks,
+ each one gets the same stack size.
+
+ See b/176180736 for checking these stack sizes.
+
+endif # HAS_TASK_USB_CHG_P0
+
+config HAS_TASK_USB_CHG_P1
+ bool "USB Charger (port 1)"
+ help
+ This turns on the USB charger task for port 1. This handles
+ negotiating power from an attached charger, trying to get the maximum
+ available power consistent with the needs of the device.
+
+ There is one of these tasks for each USB-C port on the device.
+
+config HAS_TASK_USB_CHG_P2
+ bool "USB Charger (port 2)"
+ help
+ This turns on the USB charger task for port 2. This handles
+ negotiating power from an attached charger, trying to get the maximum
+ available power consistent with the needs of the device.
+
+ There is one of these tasks for each USB-C port on the device.
+
endmenu # Tasks