summaryrefslogtreecommitdiff
path: root/include/charge_state_v1.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /include/charge_state_v1.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14695.85.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'include/charge_state_v1.h')
-rw-r--r--include/charge_state_v1.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/include/charge_state_v1.h b/include/charge_state_v1.h
deleted file mode 100644
index 6bc8529a6e..0000000000
--- a/include/charge_state_v1.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "battery.h"
-#include "timer.h"
-
-#ifndef __CROS_EC_CHARGE_STATE_V1_H
-#define __CROS_EC_CHARGE_STATE_V1_H
-
-/* Update period to prevent charger watchdog timeout */
-#define CHARGER_UPDATE_PERIOD (SECOND * 10)
-
-/* Power state error flags */
-#define F_CHARGER_INIT BIT(0) /* Charger initialization */
-#define F_CHARGER_VOLTAGE BIT(1) /* Charger maximum output voltage */
-#define F_CHARGER_CURRENT BIT(2) /* Charger maximum output current */
-#define F_BATTERY_VOLTAGE BIT(3) /* Battery voltage */
-#define F_BATTERY_MODE BIT(8) /* Battery mode */
-#define F_BATTERY_CAPACITY BIT(9) /* Battery capacity */
-#define F_BATTERY_STATE_OF_CHARGE BIT(10) /* State of charge, percentage */
-#define F_BATTERY_UNRESPONSIVE BIT(11) /* Battery not responding */
-#define F_BATTERY_NOT_CONNECTED BIT(12) /* Battery not connected */
-#define F_BATTERY_GET_PARAMS BIT(13) /* Any battery parameter bad */
-
-#define F_BATTERY_MASK (F_BATTERY_VOLTAGE | \
- F_BATTERY_MODE | \
- F_BATTERY_CAPACITY | F_BATTERY_STATE_OF_CHARGE | \
- F_BATTERY_UNRESPONSIVE | F_BATTERY_NOT_CONNECTED | \
- F_BATTERY_GET_PARAMS)
-#define F_CHARGER_MASK (F_CHARGER_VOLTAGE | F_CHARGER_CURRENT | \
- F_CHARGER_INIT)
-
-/* Power state data
- * Status collection of charging state machine.
- */
-struct charge_state_data {
- int ac;
- int charging_voltage;
- int charging_current;
- struct batt_params batt;
- enum charge_state state;
- uint32_t error;
- timestamp_t ts;
-};
-
-/* State context
- * The shared context for state handler. The context contains current and
- * previous state.
- */
-struct charge_state_context {
- struct charge_state_data curr;
- struct charge_state_data prev;
- timestamp_t charge_state_updated_time;
- uint32_t *memmap_batt_volt;
- uint32_t *memmap_batt_rate;
- uint32_t *memmap_batt_cap;
- uint8_t *memmap_batt_flags;
- /* Charger and battery pack info */
- const struct charger_info *charger;
- const struct battery_info *battery;
- /* Charging timestamps */
- timestamp_t charger_update_time;
- timestamp_t trickle_charging_time;
- timestamp_t voltage_debounce_time;
- timestamp_t shutdown_warning_time;
- int battery_responsive;
-};
-
-#endif /* __CROS_EC_CHARGE_STATE_V1_H */
-