summaryrefslogtreecommitdiff
path: root/board/fizz/board.h
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-03-22 20:07:39 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-04-10 19:13:32 -0700
commit46ca9738f23d91148519fdaf31e8791be49855e3 (patch)
tree44c57af9f4710e84ef6735888386b4582cf2719f /board/fizz/board.h
parentdccaf9d9fce04a1e2fd1eb51fb85627ef2976146 (diff)
downloadchrome-ec-46ca9738f23d91148519fdaf31e8791be49855e3.tar.gz
chgstv2: Check charger power in prevent_power_on.
charge_prevent_power_on() had sections which were gated on the following CONFIG_* option: CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT However, the block of code that this gated didn't even take the battery percentage into account and made it very confusing as to why. This commit simply changes the CONFIG_* option used to gate to be the following: CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON This better reflects the checks that were actually being made. Additionally, this CONFIG_* option is defined by default for boards that have a chipset task and is initialized to 15W, which is the power that indicates that the charger is likely to speak USB PD. BUG=b:76174140 BRANCH=None TEST=make -j buildall Change-Id: Ic9158dd7109ce6082c6d00157ff266842363b295 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/977431 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/fizz/board.h')
-rw-r--r--board/fizz/board.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/fizz/board.h b/board/fizz/board.h
index 439870eb66..464b517db8 100644
--- a/board/fizz/board.h
+++ b/board/fizz/board.h
@@ -69,7 +69,7 @@
/* Charger */
#define CONFIG_CHARGE_MANAGER
-#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 50000
+#define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 50000
#define CONFIG_CMD_PD_CONTROL
#define CONFIG_EXTPOWER_GPIO
@@ -233,7 +233,7 @@ enum mft_channel {
/* Define typical operating power. Since Fizz doesn't have a battery to charge,
* we're not interested in any power lower than the AP power-on threshold. */
-#define PD_OPERATING_POWER_MW CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW
+#define PD_OPERATING_POWER_MW CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON
#define PD_MAX_POWER_MW 100000
#define PD_MAX_CURRENT_MA 5000
#define PD_MAX_VOLTAGE_MV 20000