summaryrefslogtreecommitdiff
path: root/include/charge_state.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2022-06-15 04:03:52 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-15 20:29:40 +0000
commit9413c15c102533989b2357cb81f8955bb0c842d2 (patch)
tree8108ad58ebd1365eeca3a17a0d0ad0fc2ed581ca /include/charge_state.h
parentcc752f8f4d4db97dfbad8f6d5ffc7b2c5ac1fd10 (diff)
downloadchrome-ec-9413c15c102533989b2357cb81f8955bb0c842d2.tar.gz
charge_state: Remove unnecessary macro guards
Declarations don't needed to be guarded unless there is a conflicting declaration. This patch removes guards for charge_get_percent and board_get_battery_soc in charge_state.h. This patch allows the aforementioned declarations to be used in unit tests without declaring CONFIG_CHARGER or CONFIG_BATTERY. BUG=None BRANCH=None TEST=buildall Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Iee833210e00b34df874c89cacfc49d45253b5600 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3704269 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'include/charge_state.h')
-rw-r--r--include/charge_state.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/charge_state.h b/include/charge_state.h
index 9349c3ea4c..ed777c1a64 100644
--- a/include/charge_state.h
+++ b/include/charge_state.h
@@ -96,17 +96,15 @@ int charge_keep_power_off(void);
*/
uint32_t charge_get_flags(void);
-#if defined(CONFIG_CHARGER)
/**
* Return current battery charge percentage.
*/
int charge_get_percent(void);
-#elif defined(CONFIG_BATTERY)
+
/**
* Return current battery charge if not using charge manager sub-system.
*/
int board_get_battery_soc(void);
-#endif
/**
* Return current display charge in 10ths of a percent (e.g. 1000 = 100.0%)