diff options
Diffstat (limited to 'baseboard/volteer')
-rw-r--r-- | baseboard/volteer/baseboard.c | 2 | ||||
-rw-r--r-- | baseboard/volteer/baseboard.h | 7 | ||||
-rw-r--r-- | baseboard/volteer/battery_presence.c | 4 | ||||
-rw-r--r-- | baseboard/volteer/cbi.h | 2 | ||||
-rw-r--r-- | baseboard/volteer/cbi_ec_fw_config.c | 2 | ||||
-rw-r--r-- | baseboard/volteer/charger.c | 11 | ||||
-rw-r--r-- | baseboard/volteer/usb_pd_policy.c | 4 | ||||
-rw-r--r-- | baseboard/volteer/usbc_config.c | 15 |
8 files changed, 25 insertions, 22 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c index b9f10fd360..fd36aef81f 100644 --- a/baseboard/volteer/baseboard.c +++ b/baseboard/volteer/baseboard.c @@ -7,8 +7,8 @@ #include "adc.h" #include "button.h" #include "cbi_ec_fw_config.h" -#include "charge_ramp.h" #include "charger.h" +#include "charge_ramp.h" #include "cros_board_info.h" #include "driver/charger/isl9241.h" #include "driver/tcpm/ps8xxx.h" diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index d3c82f0651..3b8e475fe5 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -107,8 +107,7 @@ #define CONFIG_CHARGE_MANAGER #define CONFIG_CHARGER #define CONFIG_CHARGER_DISCHARGE_ON_AC -#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512 -#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512 +#define CONFIG_CHARGER_INPUT_CURRENT 512 /* * Hardware based charge ramp is broken in the ISL9241 (b/169350714). @@ -244,10 +243,10 @@ #ifndef __ASSEMBLER__ +#include "gpio_signal.h" +#include "common.h" #include "baseboard_usbc_config.h" #include "cbi.h" -#include "common.h" -#include "gpio_signal.h" enum adc_channel { ADC_TEMP_SENSOR_1_CHARGER, diff --git a/baseboard/volteer/battery_presence.c b/baseboard/volteer/battery_presence.c index d656b7b626..f143b67c91 100644 --- a/baseboard/volteer/battery_presence.c +++ b/baseboard/volteer/battery_presence.c @@ -6,12 +6,12 @@ * Each board should implement board_battery_info[] to define the specific * battery packs supported. */ +#include <stdbool.h> + #include "battery.h" #include "battery_smart.h" #include "gpio.h" -#include <stdbool.h> - static enum battery_present batt_pres_prev = BP_NOT_SURE; enum battery_present battery_hw_present(void) diff --git a/baseboard/volteer/cbi.h b/baseboard/volteer/cbi.h index 4b4044ea3c..dc940f1edc 100644 --- a/baseboard/volteer/cbi.h +++ b/baseboard/volteer/cbi.h @@ -8,8 +8,6 @@ #ifndef __CROS_EC_BASEBOARD_CBI_H #define __CROS_EC_BASEBOARD_CBI_H -#include "common.h" - unsigned char get_board_id(void); /** diff --git a/baseboard/volteer/cbi_ec_fw_config.c b/baseboard/volteer/cbi_ec_fw_config.c index f925498774..7506278e16 100644 --- a/baseboard/volteer/cbi_ec_fw_config.c +++ b/baseboard/volteer/cbi_ec_fw_config.c @@ -3,9 +3,9 @@ * found in the LICENSE file. */ -#include "cbi_ec_fw_config.h" #include "common.h" #include "console.h" +#include "cbi_ec_fw_config.h" #include "cros_board_info.h" #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ##args) diff --git a/baseboard/volteer/charger.c b/baseboard/volteer/charger.c index 17f1fe5f7d..84fa4e037c 100644 --- a/baseboard/volteer/charger.c +++ b/baseboard/volteer/charger.c @@ -4,10 +4,10 @@ */ /* Volteer family-specific configuration */ +#include "common.h" +#include "charger.h" #include "charge_manager.h" #include "charge_state.h" -#include "charger.h" -#include "common.h" #include "driver/charger/isl9241_public.h" #include "gpio.h" #ifdef CONFIG_ZEPHYR @@ -80,6 +80,13 @@ int board_set_active_charge_port(int port) return EC_SUCCESS; } +__overridable void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int 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) { /* Note that the level is inverted because the pin is active low. */ diff --git a/baseboard/volteer/usb_pd_policy.c b/baseboard/volteer/usb_pd_policy.c index 18c24b64ef..81e02b769f 100644 --- a/baseboard/volteer/usb_pd_policy.c +++ b/baseboard/volteer/usb_pd_policy.c @@ -8,11 +8,11 @@ #include "compile_time_macros.h" #include "console.h" #include "gpio.h" -#include "system.h" #include "usb_common.h" #include "usb_mux.h" -#include "usb_pd.h" #include "usbc_ppc.h" +#include "usb_pd.h" +#include "system.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args) #define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args) diff --git a/baseboard/volteer/usbc_config.c b/baseboard/volteer/usbc_config.c index d77e275282..001f47e45f 100644 --- a/baseboard/volteer/usbc_config.c +++ b/baseboard/volteer/usbc_config.c @@ -5,22 +5,21 @@ /* Volteer family-specific USB-C configuration */ +#include "common.h" #include "charge_manager.h" #include "charge_ramp.h" #include "charge_state.h" -#include "common.h" -#include "driver/charger/isl9241_public.h" #include "gpio.h" #include "task.h" -#include "usb_charge.h" -#include "usb_pd.h" -#include "usbc_ppc.h" -#include "util.h" - #ifdef CONFIG_ZEPHYR -#include "baseboard_usbc_config.h" #include "usbc_config.h" +#include "baseboard_usbc_config.h" #endif +#include "usbc_ppc.h" +#include "usb_pd.h" +#include "usb_charge.h" +#include "util.h" +#include "driver/charger/isl9241_public.h" /******************************************************************************/ void tcpc_alert_event(enum gpio_signal signal) |