summaryrefslogtreecommitdiff
path: root/baseboard/volteer/charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'baseboard/volteer/charger.c')
-rw-r--r--baseboard/volteer/charger.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/baseboard/volteer/charger.c b/baseboard/volteer/charger.c
index a674b98f41..84fa4e037c 100644
--- a/baseboard/volteer/charger.c
+++ b/baseboard/volteer/charger.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -16,8 +16,8 @@
#include "usbc_ppc.h"
#include "util.h"
-#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ## args)
-#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ## args)
+#define CPRINTSUSB(format, args...) cprints(CC_USBCHARGE, format, ##args)
+#define CPRINTFUSB(format, args...) cprintf(CC_USBCHARGE, format, ##args)
/* Charger Chip Configuration */
const struct charger_config_t chg_chips[] = {
@@ -30,8 +30,7 @@ const struct charger_config_t chg_chips[] = {
int board_set_active_charge_port(int port)
{
- int is_valid_port = (port >= 0 &&
- port < CONFIG_USB_PD_PORT_MAX_COUNT);
+ int is_valid_port = (port >= 0 && port < CONFIG_USB_PD_PORT_MAX_COUNT);
int i;
if (port == CHARGE_PORT_NONE) {
@@ -52,7 +51,6 @@ int board_set_active_charge_port(int port)
return EC_ERROR_INVAL;
}
-
/* Check if the port is sourcing VBUS. */
if (ppc_is_sourcing_vbus(port)) {
CPRINTFUSB("Skip enable C%d", port);
@@ -83,11 +81,10 @@ int board_set_active_charge_port(int port)
}
__overridable void board_set_charge_limit(int port, int supplier, int charge_ma,
- int max_ma, int charge_mv)
+ int max_ma, int charge_mv)
{
- charge_set_input_current_limit(MAX(charge_ma,
- CONFIG_CHARGER_INPUT_CURRENT),
- charge_mv);
+ charge_set_input_current_limit(
+ MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv);
}
void board_overcurrent_event(int port, int is_overcurrented)