Loading drivers/power/supply/qcom/smb-lib.c +13 −0 Original line number Diff line number Diff line Loading @@ -3524,6 +3524,11 @@ void smblib_usb_plugin_locked(struct smb_charger *chg) chg->chg_freq.freq_removal); if (vbus_rising) { if (smblib_get_prop_dfp_mode(chg) != POWER_SUPPLY_TYPEC_NONE) { chg->fake_usb_insertion = true; return; } rc = smblib_request_dpdm(chg, true); if (rc < 0) smblib_err(chg, "Couldn't to enable DPDM rc=%d\n", rc); Loading @@ -3537,6 +3542,11 @@ void smblib_usb_plugin_locked(struct smb_charger *chg) !chg->pd_active) pr_err("APSD disabled on vbus rising without PD\n"); } else { if (chg->fake_usb_insertion) { chg->fake_usb_insertion = false; return; } if (chg->wa_flags & BOOST_BACK_WA) { data = chg->irq_info[SWITCH_POWER_OK_IRQ].irq_data; if (data) { Loading Loading @@ -3899,6 +3909,9 @@ irqreturn_t smblib_handle_usb_source_change(int irq, void *data) int rc = 0; u8 stat; if (chg->fake_usb_insertion) return IRQ_HANDLED; rc = smblib_read(chg, APSD_STATUS_REG, &stat); if (rc < 0) { smblib_err(chg, "Couldn't read APSD_STATUS rc=%d\n", rc); Loading drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ struct smb_charger { bool try_sink_active; int boost_current_ua; int temp_speed_reading_count; bool fake_usb_insertion; /* extcon for VBUS / ID notification to USB for uUSB */ struct extcon_dev *extcon; Loading Loading
drivers/power/supply/qcom/smb-lib.c +13 −0 Original line number Diff line number Diff line Loading @@ -3524,6 +3524,11 @@ void smblib_usb_plugin_locked(struct smb_charger *chg) chg->chg_freq.freq_removal); if (vbus_rising) { if (smblib_get_prop_dfp_mode(chg) != POWER_SUPPLY_TYPEC_NONE) { chg->fake_usb_insertion = true; return; } rc = smblib_request_dpdm(chg, true); if (rc < 0) smblib_err(chg, "Couldn't to enable DPDM rc=%d\n", rc); Loading @@ -3537,6 +3542,11 @@ void smblib_usb_plugin_locked(struct smb_charger *chg) !chg->pd_active) pr_err("APSD disabled on vbus rising without PD\n"); } else { if (chg->fake_usb_insertion) { chg->fake_usb_insertion = false; return; } if (chg->wa_flags & BOOST_BACK_WA) { data = chg->irq_info[SWITCH_POWER_OK_IRQ].irq_data; if (data) { Loading Loading @@ -3899,6 +3909,9 @@ irqreturn_t smblib_handle_usb_source_change(int irq, void *data) int rc = 0; u8 stat; if (chg->fake_usb_insertion) return IRQ_HANDLED; rc = smblib_read(chg, APSD_STATUS_REG, &stat); if (rc < 0) { smblib_err(chg, "Couldn't read APSD_STATUS rc=%d\n", rc); Loading
drivers/power/supply/qcom/smb-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ struct smb_charger { bool try_sink_active; int boost_current_ua; int temp_speed_reading_count; bool fake_usb_insertion; /* extcon for VBUS / ID notification to USB for uUSB */ struct extcon_dev *extcon; Loading