summaryrefslogtreecommitdiff
path: root/board/host/charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/host/charger.c')
-rw-r--r--board/host/charger.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/board/host/charger.c b/board/host/charger.c
index 4db1f44351..fddadf245d 100644
--- a/board/host/charger.c
+++ b/board/host/charger.c
@@ -1,4 +1,4 @@
-/* Copyright 2012 The Chromium OS Authors. All rights reserved.
+/* Copyright 2012 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -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;