diff options
Diffstat (limited to 'board/mchpevb1/battery.c')
-rw-r--r-- | board/mchpevb1/battery.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/board/mchpevb1/battery.c b/board/mchpevb1/battery.c index fcc09994bf..d8f7496fa0 100644 --- a/board/mchpevb1/battery.c +++ b/board/mchpevb1/battery.c @@ -1,4 +1,4 @@ -/* Copyright 2015 The Chromium OS Authors. All rights reserved. +/* Copyright 2015 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -14,15 +14,15 @@ #include "util.h" /* Shutdown mode parameter to write to manufacturer access register */ -#define PARAM_CUT_OFF_LOW 0x10 +#define PARAM_CUT_OFF_LOW 0x10 #define PARAM_CUT_OFF_HIGH 0x00 /* Battery info for BQ40Z55 */ static const struct battery_info info = { - .voltage_max = 8700, /* mV */ + .voltage_max = 8700, /* mV */ .voltage_normal = 7600, .voltage_min = 6000, - .precharge_current = 256, /* mA */ + .precharge_current = 256, /* mA */ .start_charging_min_c = 0, .start_charging_max_c = 46, .charging_min_c = 0, @@ -47,10 +47,10 @@ int board_cut_off_battery(void) buf[2] = PARAM_CUT_OFF_HIGH; i2c_lock(I2C_PORT_BATTERY, 1); - rv = i2c_xfer_unlocked(I2C_PORT_BATTERY, BATTERY_ADDR_FLAGS, - buf, 3, NULL, 0, I2C_XFER_SINGLE); - rv |= i2c_xfer_unlocked(I2C_PORT_BATTERY, BATTERY_ADDR_FLAGS, - buf, 3, NULL, 0, I2C_XFER_SINGLE); + rv = i2c_xfer_unlocked(I2C_PORT_BATTERY, BATTERY_ADDR_FLAGS, buf, 3, + NULL, 0, I2C_XFER_SINGLE); + rv |= i2c_xfer_unlocked(I2C_PORT_BATTERY, BATTERY_ADDR_FLAGS, buf, 3, + NULL, 0, I2C_XFER_SINGLE); i2c_lock(I2C_PORT_BATTERY, 0); return rv; @@ -214,7 +214,7 @@ enum ec_status charger_profile_override_set_param(uint32_t param, return EC_RES_INVALID_PARAM; } -static int command_fastcharge(int argc, char **argv) +static int command_fastcharge(int argc, const char **argv) { if (argc > 1 && !parse_bool(argv[1], &fast_charging_allowed)) return EC_ERROR_PARAM1; @@ -223,8 +223,7 @@ static int command_fastcharge(int argc, char **argv) return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(fastcharge, command_fastcharge, - "[on|off]", +DECLARE_CONSOLE_COMMAND(fastcharge, command_fastcharge, "[on|off]", "Get or set fast charging profile"); -#endif /* CONFIG_CHARGER_PROFILE_OVERRIDE */ +#endif /* CONFIG_CHARGER_PROFILE_OVERRIDE */ |