summaryrefslogtreecommitdiff
path: root/board/lazor
diff options
context:
space:
mode:
Diffstat (limited to 'board/lazor')
-rw-r--r--board/lazor/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/lazor/board.c b/board/lazor/board.c
index ad0d19e24b..66701af613 100644
--- a/board/lazor/board.c
+++ b/board/lazor/board.c
@@ -6,6 +6,7 @@
/* Lazor board-specific configuration */
#include "adc_chip.h"
+#include "battery_fuel_gauge.h"
#include "button.h"
#include "charge_manager.h"
#include "charge_state.h"
@@ -414,6 +415,20 @@ enum battery_cell_type board_get_battery_cell_type(void)
return BATTERY_CELL_TYPE_UNKNOWN;
}
+__override int board_get_default_battery_type(void)
+{
+ /*
+ * A 2S battery is set as default. If the board is configured to use
+ * a 3S battery, according to its SKU_ID, return a 3S battery as
+ * default. It helps to configure the charger to output a correct
+ * voltage in case the battery is not attached.
+ */
+ if (board_get_battery_cell_type() == BATTERY_CELL_TYPE_3S)
+ return BATTERY_LGC_AP18C8K;
+
+ return DEFAULT_BATTERY_TYPE;
+}
+
static void board_update_sensor_config_from_sku(void)
{
if (board_is_clamshell()) {