diff options
Diffstat (limited to 'zephyr/projects/brya/battery_present.c')
-rw-r--r-- | zephyr/projects/brya/battery_present.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/zephyr/projects/brya/battery_present.c b/zephyr/projects/brya/battery_present.c deleted file mode 100644 index c487a01f36..0000000000 --- a/zephyr/projects/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 <zephyr/drivers/gpio.h> - -#include "battery.h" -#include "cbi.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; -} |