summaryrefslogtreecommitdiff
path: root/include/charge_state.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-08 15:20:07 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-11 14:04:23 +0000
commit67debcce5555daf1c24e1eada34f7607bf041308 (patch)
tree2ff540cb25f3b08d127d01416f79235eb3022f23 /include/charge_state.h
parent7d727e6ec9d487530c909027adcaa0d91c9794d2 (diff)
downloadchrome-ec-67debcce5555daf1c24e1eada34f7607bf041308.tar.gz
charger: Rename enum charge_state to led_pwr_state
This name is confusing, since its members start with PWR_ and the comment for enum charge_state_v2 says that these values are only used to control the LEDs, with one not-quite-correct exception, whatever that might be. We could rename it to power_state, but that is already fairly widely used as a variable in the code base. Also it seems better to match the enum PWR_ prefix. Future work may rename the members too. Rename the charge_state enum. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: If8a7cc73dcfb4c1e89984e57fc55e432416e8aec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516187 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r--include/charge_state.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/charge_state.h b/include/charge_state.h
index dcf3430954..6d9c1d5b19 100644
--- a/include/charge_state.h
+++ b/include/charge_state.h
@@ -26,7 +26,7 @@
#endif
/* Power states */
-enum charge_state {
+enum led_pwr_state {
/* Meta-state; unchanged from previous time through task loop */
PWR_STATE_UNCHANGE = 0,
/* Initializing charge state machine at boot */
@@ -61,7 +61,7 @@ enum charge_state {
/* Battery is responsive */
#define CHARGE_FLAG_BATT_RESPONSIVE BIT(2)
-/* Debugging constants, in the same order as enum charge_state. This string
+/* Debugging constants, in the same order as enum led_pwr_state. This string
* table was moved here to sync with enum above.
*/
#define CHARGE_STATE_NAME_TABLE \
@@ -75,7 +75,7 @@ enum charge_state {
/**
* Return current charge state.
*/
-enum charge_state charge_get_state(void);
+enum led_pwr_state charge_get_state(void);
/**
* Return current charge v2 state.