summaryrefslogtreecommitdiff
path: root/zephyr/program/brya/battery_present.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/program/brya/battery_present.c')
-rw-r--r--zephyr/program/brya/battery_present.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/zephyr/program/brya/battery_present.c b/zephyr/program/brya/battery_present.c
deleted file mode 100644
index b2af448271..0000000000
--- a/zephyr/program/brya/battery_present.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "battery.h"
-#include "cbi.h"
-
-#include <zephyr/drivers/gpio.h>
-
-enum battery_present battery_hw_present(void)
-{
- const struct gpio_dt_spec *batt_pres;
-
- if (get_board_id() == 1)
- batt_pres = GPIO_DT_FROM_NODELABEL(gpio_id_1_ec_batt_pres_odl);
- else
- batt_pres = GPIO_DT_FROM_NODELABEL(gpio_ec_batt_pres_odl);
-
- /* The GPIO is low when the battery is physically present */
- return gpio_pin_get_dt(batt_pres) ? BP_NO : BP_YES;
-}