Loading drivers/power/supply/qcom/smb-lib.c +8 −0 Original line number Diff line number Diff line Loading @@ -688,6 +688,7 @@ static void smblib_uusb_removal(struct smb_charger *chg) vote(chg->pl_enable_votable_indirect, USBIN_V_VOTER, false, 0); vote(chg->usb_icl_votable, SW_QC3_VOTER, false, 0); vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); cancel_delayed_work_sync(&chg->hvdcp_detect_work); Loading Loading @@ -2245,11 +2246,15 @@ int smblib_dp_dm(struct smb_charger *chg, int val) pr_err("Failed to force 5V\n"); break; case POWER_SUPPLY_DP_DM_FORCE_9V: /* Force 1A ICL before requesting higher voltage */ vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, true, 1000000); rc = smblib_force_vbus_voltage(chg, FORCE_9V_BIT); if (rc < 0) pr_err("Failed to force 9V\n"); break; case POWER_SUPPLY_DP_DM_FORCE_12V: /* Force 1A ICL before requesting higher voltage */ vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, true, 1000000); rc = smblib_force_vbus_voltage(chg, FORCE_12V_BIT); if (rc < 0) pr_err("Failed to force 12V\n"); Loading Loading @@ -3607,10 +3612,12 @@ static void smblib_hvdcp_adaptive_voltage_change(struct smb_charger *chg) case QC_9V_BIT: smblib_set_opt_freq_buck(chg, chg->chg_freq.freq_9V); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); break; case QC_12V_BIT: smblib_set_opt_freq_buck(chg, chg->chg_freq.freq_12V); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); break; default: smblib_set_opt_freq_buck(chg, Loading Loading @@ -4131,6 +4138,7 @@ static void smblib_handle_typec_removal(struct smb_charger *chg) vote(chg->usb_icl_votable, SW_QC3_VOTER, false, 0); vote(chg->usb_icl_votable, OTG_VOTER, false, 0); vote(chg->usb_icl_votable, CTM_VOTER, false, 0); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); /* reset hvdcp voters */ vote(chg->hvdcp_disable_votable_indirect, VBUS_CC_SHORT_VOTER, true, 0); Loading drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ enum print_reason { #define PL_FCC_LOW_VOTER "PL_FCC_LOW_VOTER" #define WBC_VOTER "WBC_VOTER" #define MOISTURE_VOTER "MOISTURE_VOTER" #define HVDCP2_ICL_VOTER "HVDCP2_ICL_VOTER" #define VCONN_MAX_ATTEMPTS 3 #define OTG_MAX_ATTEMPTS 3 Loading Loading
drivers/power/supply/qcom/smb-lib.c +8 −0 Original line number Diff line number Diff line Loading @@ -688,6 +688,7 @@ static void smblib_uusb_removal(struct smb_charger *chg) vote(chg->pl_enable_votable_indirect, USBIN_V_VOTER, false, 0); vote(chg->usb_icl_votable, SW_QC3_VOTER, false, 0); vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); cancel_delayed_work_sync(&chg->hvdcp_detect_work); Loading Loading @@ -2245,11 +2246,15 @@ int smblib_dp_dm(struct smb_charger *chg, int val) pr_err("Failed to force 5V\n"); break; case POWER_SUPPLY_DP_DM_FORCE_9V: /* Force 1A ICL before requesting higher voltage */ vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, true, 1000000); rc = smblib_force_vbus_voltage(chg, FORCE_9V_BIT); if (rc < 0) pr_err("Failed to force 9V\n"); break; case POWER_SUPPLY_DP_DM_FORCE_12V: /* Force 1A ICL before requesting higher voltage */ vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, true, 1000000); rc = smblib_force_vbus_voltage(chg, FORCE_12V_BIT); if (rc < 0) pr_err("Failed to force 12V\n"); Loading Loading @@ -3607,10 +3612,12 @@ static void smblib_hvdcp_adaptive_voltage_change(struct smb_charger *chg) case QC_9V_BIT: smblib_set_opt_freq_buck(chg, chg->chg_freq.freq_9V); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); break; case QC_12V_BIT: smblib_set_opt_freq_buck(chg, chg->chg_freq.freq_12V); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); break; default: smblib_set_opt_freq_buck(chg, Loading Loading @@ -4131,6 +4138,7 @@ static void smblib_handle_typec_removal(struct smb_charger *chg) vote(chg->usb_icl_votable, SW_QC3_VOTER, false, 0); vote(chg->usb_icl_votable, OTG_VOTER, false, 0); vote(chg->usb_icl_votable, CTM_VOTER, false, 0); vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0); /* reset hvdcp voters */ vote(chg->hvdcp_disable_votable_indirect, VBUS_CC_SHORT_VOTER, true, 0); Loading
drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ enum print_reason { #define PL_FCC_LOW_VOTER "PL_FCC_LOW_VOTER" #define WBC_VOTER "WBC_VOTER" #define MOISTURE_VOTER "MOISTURE_VOTER" #define HVDCP2_ICL_VOTER "HVDCP2_ICL_VOTER" #define VCONN_MAX_ATTEMPTS 3 #define OTG_MAX_ATTEMPTS 3 Loading