diff options
Diffstat (limited to 'board/host/charger.c')
-rw-r--r-- | board/host/charger.c | 25 |
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; |