summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/puff/board.c11
-rw-r--r--board/puff/board.h3
2 files changed, 11 insertions, 3 deletions
diff --git a/board/puff/board.c b/board/puff/board.c
index 80ebedf7c2..4a6bb667b3 100644
--- a/board/puff/board.c
+++ b/board/puff/board.c
@@ -394,7 +394,13 @@ const unsigned int ina3221_count = ARRAY_SIZE(ina3221);
static void board_init(void)
{
+ uint8_t *memmap_batt_flags;
+
update_port_limits();
+
+ /* Always claim AC is online, because we don't have a battery. */
+ memmap_batt_flags = host_get_memmap(EC_MEMMAP_BATT_FLAG);
+ *memmap_batt_flags |= EC_BATT_FLAG_AC_PRESENT;
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -510,3 +516,8 @@ void board_overcurrent_event(int port, int is_overcurrented)
return;
usbc_overcurrent = is_overcurrented;
}
+
+int extpower_is_present(void)
+{
+ return adp_connected;
+}
diff --git a/board/puff/board.h b/board/puff/board.h
index 5eac746c07..d8db1d112e 100644
--- a/board/puff/board.h
+++ b/board/puff/board.h
@@ -129,9 +129,6 @@
/* Check: */
#define CONFIG_POWER_BUTTON_INIT_IDLE
#define CONFIG_POWER_COMMON
-/* from fizz - Check */
-/* check: #define CONFIG_EXTPOWER_DEBOUNCE_MS */
-#define CONFIG_EXTPOWER_GPIO
#define CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD 30
#define CONFIG_DELAY_DSW_PWROK_TO_PWRBTN
#define CONFIG_POWER_PP5000_CONTROL