summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 13:39:49 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 15:23:05 +0000
commitaea3a67eacef50202a753743fb4853e50ef43c80 (patch)
tree6ec0a1b93260ee8a5e94a5d9cc9421bf15a36463
parentf5b67dd7e18de42df492b40e839562da5acc74ae (diff)
downloadchrome-ec-aea3a67eacef50202a753743fb4853e50ef43c80.tar.gz
board/host/charger.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I62a9cf47d8e839fabe030b42fbc43ddffa4d4bc9 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728508 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--board/host/charger.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/board/host/charger.c b/board/host/charger.c
index 4db1f44351..9249b1d591 100644
--- a/board/host/charger.c
+++ b/board/host/charger.c
@@ -12,15 +12,15 @@
#include "util.h"
static const struct charger_info mock_charger_info = {
- .name = "MockCharger",
- .voltage_max = 19200,
- .voltage_min = 1024,
+ .name = "MockCharger",
+ .voltage_max = 19200,
+ .voltage_min = 1024,
.voltage_step = 16,
- .current_max = 8192,
- .current_min = 128,
+ .current_max = 8192,
+ .current_min = 128,
.current_step = 128,
- .input_current_max = 8064,
- .input_current_min = 128,
+ .input_current_max = 8064,
+ .input_current_min = 128,
.input_current_step = 128,
};
@@ -37,7 +37,6 @@ static const struct charger_info *mock_get_info(int chgnum)
return &mock_charger_info;
}
-
static enum ec_error_list mock_get_status(int chgnum, int *status)
{
*status = CHARGER_LEVEL_2;
@@ -47,7 +46,6 @@ static enum ec_error_list mock_get_status(int chgnum, int *status)
return EC_SUCCESS;
}
-
static enum ec_error_list mock_set_mode(int chgnum, int mode)
{
if (mode & CHARGE_FLAG_INHIBIT_CHARGE)
@@ -57,14 +55,12 @@ static enum ec_error_list mock_set_mode(int chgnum, int mode)
return EC_SUCCESS;
}
-
static enum ec_error_list mock_get_current(int chgnum, int *current)
{
*current = mock_current;
return EC_SUCCESS;
}
-
static enum ec_error_list mock_set_current(int chgnum, int current)
{
const struct charger_info *info = mock_get_info(chgnum);
@@ -86,7 +82,6 @@ static enum ec_error_list mock_get_voltage(int chgnum, int *voltage)
return EC_SUCCESS;
}
-
static enum ec_error_list mock_set_voltage(int chgnum, int voltage)
{
mock_voltage = voltage;
@@ -94,27 +89,23 @@ static enum ec_error_list mock_set_voltage(int chgnum, int voltage)
return EC_SUCCESS;
}
-
static enum ec_error_list mock_get_option(int chgnum, int *option)
{
*option = mock_option;
return EC_SUCCESS;
}
-
static enum ec_error_list mock_set_option(int chgnum, int option)
{
mock_option = option;
return EC_SUCCESS;
}
-
static enum ec_error_list mock_manufacturer_id(int chgnum, int *id)
{
return EC_SUCCESS;
}
-
static enum ec_error_list mock_device_id(int chgnum, int *id)
{
return EC_SUCCESS;
@@ -127,7 +118,6 @@ static enum ec_error_list mock_get_input_current_limit(int chgnum,
return EC_SUCCESS;
}
-
static enum ec_error_list mock_set_input_current_limit(int chgnum, int current)
{
const struct charger_info *info = mock_get_info(chgnum);
@@ -144,7 +134,6 @@ static enum ec_error_list mock_set_input_current_limit(int chgnum, int current)
return EC_SUCCESS;
}
-
static enum ec_error_list mock_post_init(int chgnum)
{
mock_current = mock_input_current = CONFIG_CHARGER_INPUT_CURRENT;