diff options
Diffstat (limited to 'driver/charger/bq24715.c')
-rw-r--r-- | driver/charger/bq24715.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/driver/charger/bq24715.c b/driver/charger/bq24715.c index d2eb0e432a..8e8e0efd50 100644 --- a/driver/charger/bq24715.c +++ b/driver/charger/bq24715.c @@ -1,4 +1,4 @@ -/* Copyright 2013 The Chromium OS Authors. All rights reserved. +/* Copyright 2013 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -16,37 +16,35 @@ /* Sense resistor configurations and macros */ #define DEFAULT_SENSE_RESISTOR 10 #define R_SNS CONFIG_CHARGER_SENSE_RESISTOR -#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC -#define REG_TO_CURRENT(REG, RS) ((REG) * DEFAULT_SENSE_RESISTOR / (RS)) +#define R_AC CONFIG_CHARGER_SENSE_RESISTOR_AC +#define REG_TO_CURRENT(REG, RS) ((REG)*DEFAULT_SENSE_RESISTOR / (RS)) #define CURRENT_TO_REG(CUR, RS) ((CUR) * (RS) / DEFAULT_SENSE_RESISTOR) /* Note: it is assumed that the sense resistors are 10mOhm. */ static const struct charger_info bq24715_charger_info = { - .name = "bq24715", - .voltage_max = CHARGE_V_MAX, - .voltage_min = CHARGE_V_MIN, + .name = "bq24715", + .voltage_max = CHARGE_V_MAX, + .voltage_min = CHARGE_V_MIN, .voltage_step = CHARGE_V_STEP, - .current_max = REG_TO_CURRENT(CHARGE_I_MAX, R_SNS), - .current_min = REG_TO_CURRENT(CHARGE_I_MIN, R_SNS), + .current_max = REG_TO_CURRENT(CHARGE_I_MAX, R_SNS), + .current_min = REG_TO_CURRENT(CHARGE_I_MIN, R_SNS), .current_step = REG_TO_CURRENT(CHARGE_I_STEP, R_SNS), - .input_current_max = REG_TO_CURRENT(INPUT_I_MAX, R_AC), - .input_current_min = REG_TO_CURRENT(INPUT_I_MIN, R_AC), + .input_current_max = REG_TO_CURRENT(INPUT_I_MAX, R_AC), + .input_current_min = REG_TO_CURRENT(INPUT_I_MIN, R_AC), .input_current_step = REG_TO_CURRENT(INPUT_I_STEP, R_AC), }; static inline enum ec_error_list sbc_read(int chgnum, int cmd, int *param) { return i2c_read16(chg_chips[chgnum].i2c_port, - chg_chips[chgnum].i2c_addr_flags, - cmd, param); + chg_chips[chgnum].i2c_addr_flags, cmd, param); } static inline enum ec_error_list sbc_write(int chgnum, int cmd, int param) { return i2c_write16(chg_chips[chgnum].i2c_port, - chg_chips[chgnum].i2c_addr_flags, - cmd, param); + chg_chips[chgnum].i2c_addr_flags, cmd, param); } static enum ec_error_list bq24715_set_input_current_limit(int chgnum, |