summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2023-05-05 09:33:28 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-05 21:55:18 +0000
commit84f610eec742b9f84a0b11052377847679cf9276 (patch)
tree20345b63177433094fe08ba666f58307d3af9b3f
parentaf608b1d2711cecb80f396cd26aef1fde400422e (diff)
downloadchrome-ec-84f610eec742b9f84a0b11052377847679cf9276.tar.gz
vbus measure: cleanup config options
The VBUS measure config options are mutually exclusive. For boards that enable a charger with VBUS measure support and have a FUSB302 TCPC, both CONFIG_USB_PD_VBUS_MEASURE_CHARGER and CONFIG_USB_PD_VBUS_MEASURE_TCPC options were getting set. The charge manager code gives priority to CONFIG_USB_PD_VBUS_MEASURE_CHARGER so make this the default for boards that meet the criteria above. BUG=none TEST=compare_builds.sh TEST=zmake compare-builds -a Change-Id: I2beec45436c8810cd469f791228863e041b6724e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4508664 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--include/config.h3
-rw-r--r--zephyr/program/intelrvp/adlrvp/prj.conf1
2 files changed, 2 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h
index 3279cbc821..024c4f0fe2 100644
--- a/include/config.h
+++ b/include/config.h
@@ -6330,7 +6330,8 @@
* Define CONFIG_USB_PD_VBUS_MEASURE_TCPC if the tcpc on the board supports
* VBUS measurement.
*/
-#if defined(CONFIG_USB_PD_TCPM_FUSB302)
+#if defined(CONFIG_USB_PD_TCPM_FUSB302) && \
+ !defined(CONFIG_USB_PD_VBUS_MEASURE_CHARGER)
#define CONFIG_USB_PD_VBUS_MEASURE_TCPC
#endif
diff --git a/zephyr/program/intelrvp/adlrvp/prj.conf b/zephyr/program/intelrvp/adlrvp/prj.conf
index 9c372bc9ae..ef0584c4bd 100644
--- a/zephyr/program/intelrvp/adlrvp/prj.conf
+++ b/zephyr/program/intelrvp/adlrvp/prj.conf
@@ -40,7 +40,6 @@ CONFIG_PLATFORM_EC_TEMP_SENSOR_POWER=y
CONFIG_PLATFORM_EC_USB_DRP_ACC_TRYSRC=y
CONFIG_PLATFORM_EC_USB_PD_DUAL_ROLE_AUTO_TOGGLE=n
CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_CHARGER=y
-CONFIG_PLATFORM_EC_USB_PD_VBUS_MEASURE_TCPC=y
CONFIG_PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG=n
CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG=n
CONFIG_PLATFORM_EC_USB_MUX_TUSB1044=y