summaryrefslogtreecommitdiff
path: root/board/peppy/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/peppy/board.c')
-rw-r--r--board/peppy/board.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/peppy/board.c b/board/peppy/board.c
index 8e7ed2e88c..86ee193ab0 100644
--- a/board/peppy/board.c
+++ b/board/peppy/board.c
@@ -216,3 +216,15 @@ int board_g781_has_power(void)
{
return gpio_get_level(GPIO_PP3300_DX_EN);
}
+
+/**
+ * Discharge battery when on AC power for factory test.
+ */
+int board_discharge_on_ac(int enable)
+{
+ if (enable)
+ gpio_set_level(GPIO_CHARGE_L, 1);
+ else
+ gpio_set_level(GPIO_CHARGE_L, 0);
+ return EC_SUCCESS;
+}