diff options
author | Andrew McRae <amcrae@google.com> | 2022-01-11 16:44:26 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-12 02:37:38 +0000 |
commit | c05f54f8b9881b81dceb572588045e663289062c (patch) | |
tree | c7d320f6d874decd992fca0aa606765b9c11df6d /zephyr/shim/include/charger_enum.h | |
parent | 3babce86386d3b3fbf35bd7a19c3a73243500fad (diff) | |
download | chrome-ec-c05f54f8b9881b81dceb572588045e663289062c.tar.gz |
zephyr: Fix OCPC config and charger enums
Use correct OCPC config.
Also define charger enums when OCPC configured.
BUG=b:213293235
TEST=zmake configure -b nivviks; flash and run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I71d8e13a592c39ed50b2749002c825003dbcb213
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3378992
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/include/charger_enum.h')
-rw-r--r-- | zephyr/shim/include/charger_enum.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/zephyr/shim/include/charger_enum.h b/zephyr/shim/include/charger_enum.h new file mode 100644 index 0000000000..3e94ab81c3 --- /dev/null +++ b/zephyr/shim/include/charger_enum.h @@ -0,0 +1,22 @@ +/* Copyright 2022 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef ZEPHYR_SHIM_INCLUDE_CHARGER_ENUM_H_ +#define ZEPHYR_SHIM_INCLUDE_CHARGER_ENUM_H_ + +/* + * Theoretically, this should enumerate all the chargers + * by checking and processing each type, but practically + * if OCPC is enabled, there are only 2 chargers. + */ +enum chg_id { + CHARGER_PRIMARY, +#if (CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1) + CHARGER_SECONDARY, +#endif /* CONFIG_PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1 */ + CHARGER_NUM, +}; + +#endif /* ZEPHYR_SHIM_INCLUDE_CHARGER_ENUM_H_ */ |