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

Commit b5c4fec4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smblib: suspend USBIN when ICL <= 25mA"

parents 6b4eb8e8 379484a3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -891,7 +891,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
	bool override;

	/* suspend and return if 25mA or less is requested */
	if (icl_ua < USBIN_25MA)
	if (icl_ua <= USBIN_25MA)
		return smblib_set_usb_suspend(chg, true);

	if (icl_ua == INT_MAX)
@@ -1017,7 +1017,7 @@ static int smblib_dc_icl_vote_callback(struct votable *votable, void *data,
		icl_ua = 0;
	}

	suspend = (icl_ua < USBIN_25MA);
	suspend = (icl_ua <= USBIN_25MA);
	if (suspend)
		goto suspend;

@@ -4153,7 +4153,7 @@ irqreturn_t smblib_handle_switcher_power_ok(int irq, void *data)

	/* skip suspending input if its already suspended by some other voter */
	usb_icl = get_effective_result(chg->usb_icl_votable);
	if ((stat & USE_USBIN_BIT) && usb_icl >= 0 && usb_icl < USBIN_25MA)
	if ((stat & USE_USBIN_BIT) && usb_icl >= 0 && usb_icl <= USBIN_25MA)
		return IRQ_HANDLED;

	if (stat & USE_DCIN_BIT)