Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5978979d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Suspend USBIN once moisture detected"

parents eb7b2e2e 8b223833
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5432,6 +5432,7 @@ static bool smblib_src_lpd(struct smb_charger *chg)
				pval.intval, rc);
		chg->lpd_reason = LPD_MOISTURE_DETECTED;
		chg->moisture_present =  true;
		vote(chg->usb_icl_votable, LPD_VOTER, true, 0);
		alarm_start_relative(&chg->lpd_recheck_timer,
						ms_to_ktime(60000));
		power_supply_changed(chg->usb_psy);
@@ -5568,6 +5569,7 @@ static void typec_src_removal(struct smb_charger *chg)
	vote(chg->usb_icl_votable, HVDCP2_ICL_VOTER, false, 0);
	vote(chg->usb_icl_votable, CHG_TERMINATION_VOTER, false, 0);
	vote(chg->usb_icl_votable, THERMAL_THROTTLE_VOTER, false, 0);
	vote(chg->usb_icl_votable, LPD_VOTER, false, 0);

	/* reset usb irq voters */
	vote(chg->limited_irq_disable_votable, CHARGER_TYPE_VOTER,
@@ -6928,6 +6930,7 @@ static void smblib_lpd_ra_open_work(struct work_struct *work)

		chg->lpd_reason = LPD_MOISTURE_DETECTED;
		chg->moisture_present =  true;
		vote(chg->usb_icl_votable, LPD_VOTER, true, 0);

	} else {
		/* Floating cable, disable water detection irq temporarily */