summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWill Tsai <will_tsai@wistron.corp-partner.google.com>2022-09-07 19:40:00 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-19 10:26:14 +0000
commit13549841b89f14354eba1412c7a20fa018258d5f (patch)
tree304bf9dc93152a9fe959e3a1eebbf293772154cd /include
parentfbc8ddd25c7c569213542034feab8fa9346b99d9 (diff)
downloadchrome-ec-13549841b89f14354eba1412c7a20fa018258d5f.tar.gz
dps: limit the minimum operating power when AC only
We found that the system will fail to boot without battery if PDO 5V/3A is selected. To prevent boot failed, limit the minimum operating power to the larger PDO when the system is booting up without battery. BUG=b:240533589 TEST=On Joxer, confirm the selected power is equal to 9V when system booting, and the system boot up successfully. TEST=./twister -v -i --coverage -p native_posix -p unit_testing BRANCH=none Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I5d9655b09eead6791c5a3bf161e574f26f6beb02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3878627 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/dps.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/dps.h b/include/dps.h
index 0cb2a9455b..8794220ab2 100644
--- a/include/dps.h
+++ b/include/dps.h
@@ -10,6 +10,13 @@
#include "common.h"
+#define DPS_FLAG_DISABLED BIT(0)
+#define DPS_FLAG_NO_SRCCAP BIT(1)
+#define DPS_FLAG_WAITING BIT(2)
+#define DPS_FLAG_SAMPLED BIT(3)
+#define DPS_FLAG_NEED_MORE_PWR BIT(4)
+#define DPS_FLAG_NO_BATTERY BIT(5)
+
/* Dynamic PDO Selection config. */
struct dps_config_t {
/* (0, 100) coeff for transition to a lower power PDO*/
@@ -76,6 +83,8 @@ __test_only bool dps_is_fake_enabled(void);
__test_only int dps_get_fake_mv(void);
__test_only int dps_get_fake_ma(void);
__test_only int *dps_get_debug_level(void);
+__test_only int dps_get_flag(void);
+
#endif
#endif /* __CROS_EC_DPS__H */