diff options
author | Logan_Liao <Logan_Liao@compal.corp-partner.google.com> | 2023-04-28 17:25:56 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-11 21:34:44 +0000 |
commit | 93ea3936a401c31906e5c1e7b1f4ac14ff9dbdd2 (patch) | |
tree | f8d7a09bf4714674446dfbc92243559a5e9637c3 | |
parent | 7f0fefb05c6d3518e3adafc9bda8fd7e50895f1a (diff) | |
download | chrome-ec-93ea3936a401c31906e5c1e7b1f4ac14ff9dbdd2.tar.gz |
config: Add more condition for VBUS measure from charger.
Because of build gradation, build Board layer first, build config.h
later, cause that although define monitor TCPC VBUS, code still define
CONFIG_PD_VBUS_MEASURE_CHARGER when using ISL9241 which support VBUS
measure.
BUG=b:278988137
TEST=test VBUS meanure from TCPC success.
Zephyr compare builds successful:
HEAD: 28be906e09bc69e1b6ea93b5b6aac7e51f91d0d1
HEAD~: 6378b2bd5a61cde2433e92a2ee17f0f7564596da
Change-Id: I471e616d6b7ebcf49e3c69b1f037ca4ee5b37c4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4486660
Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
Commit-Queue: Logan Liao <logan_liao@compal.corp-partner.google.com>
(cherry picked from commit ecab2bd4a7bd388483a6eee18fbcf6dfcfd5f261)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520290
Reviewed-by: Chao Gui <chaogui@google.com>
Tested-by: Chao Gui <chaogui@google.com>
Commit-Queue: Chao Gui <chaogui@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | include/config.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h index 6d374ef53b..2e4f7a40f5 100644 --- a/include/config.h +++ b/include/config.h @@ -6266,6 +6266,7 @@ #define CONFIG_USBC_OCP #endif +#ifndef CONFIG_ZEPHYR /*****************************************************************************/ /* * Define CONFIG_USB_PD_VBUS_MEASURE_CHARGER if the charger on the board @@ -6275,13 +6276,17 @@ defined(CONFIG_CHARGER_RT9467) || defined(CONFIG_CHARGER_RT9490) || \ defined(CONFIG_CHARGER_MT6370) || defined(CONFIG_CHARGER_BQ25710) || \ defined(CONFIG_CHARGER_BQ25720) || defined(CONFIG_CHARGER_ISL9241) +#if !defined(CONFIG_USB_PD_VBUS_MEASURE_TCPC) && \ + !defined(CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT) && \ + !defined(CONFIG_USB_PD_VBUS_MEASURE_BY_BOARD) #define CONFIG_USB_PD_VBUS_MEASURE_CHARGER +#endif /* VBUS_MEASURE options */ #ifdef CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT #error CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT defined, but charger can measure -#endif -#endif - +#endif /* VBUS_NOT_PRESENT */ +#endif /* Charger chips */ +#endif /* CONFIG_ZEPHYR */ /*****************************************************************************/ /* * Define CONFIG_USB_PD_VBUS_MEASURE_TCPC if the tcpc on the board supports |