diff options
Diffstat (limited to 'board/ryu/board.c')
-rw-r--r-- | board/ryu/board.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c index 3ee91889d7..b34d50d3db 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -344,9 +344,6 @@ const struct adc_t adc_channels[] = { /* USB PD CC lines sensing. Converted to mV (3000mV/4096). */ [ADC_CC1_PD] = {"CC1_PD", 3000, 4096, 0, STM32_AIN(1)}, [ADC_CC2_PD] = {"CC2_PD", 3000, 4096, 0, STM32_AIN(3)}, - /* Charger current sensing. Converted to mA. */ - [ADC_IADP] = {"IADP", 7500, 4096, 0, STM32_AIN(8)}, - [ADC_IBAT] = {"IBAT", 37500, 4096, 0, STM32_AIN(13)}, }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); @@ -489,52 +486,6 @@ void board_set_charge_limit(int charge_ma) } /** - * Return whether ramping is allowed for given supplier - */ -int board_is_ramp_allowed(int supplier) -{ - return supplier == CHARGE_SUPPLIER_BC12_DCP || - supplier == CHARGE_SUPPLIER_BC12_SDP || - supplier == CHARGE_SUPPLIER_BC12_CDP || - supplier == CHARGE_SUPPLIER_PROPRIETARY; -} - -/** - * Return the maximum allowed input current - */ -int board_get_ramp_current_limit(int supplier, int sup_curr) -{ - switch (supplier) { - case CHARGE_SUPPLIER_BC12_DCP: - return 2000; - case CHARGE_SUPPLIER_BC12_SDP: - return 1000; - case CHARGE_SUPPLIER_BC12_CDP: - case CHARGE_SUPPLIER_PROPRIETARY: - return sup_curr; - default: - return 500; - } -} - -/** - * Return if board is consuming full amount of input current - */ -int board_is_consuming_full_charge(void) -{ - return adc_read_channel(ADC_IADP) >= charge_current_limit - - IADP_ERROR_MARGIN_MA; -} - -/** - * Return if VBUS is sagging low enough that we should stop ramping - */ -int board_is_vbus_too_low(enum chg_ramp_vbus_state ramp_state) -{ - return adc_read_channel(ADC_VBUS) < VBUS_LOW_THRESHOLD_MV; -} - -/* * Enable and disable SPI for case closed debugging. This forces the AP into * reset while SPI is enabled, thus preventing contention on the SPI interface. */ |