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

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

Merge "power: smb135x-charger: Don't change current limits when batt absent"

parents 2d9a4e66 26c202ce
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -869,6 +869,17 @@ static int smb135x_set_appropriate_current(struct smb135x_chg *chip,
	int (*func)(struct smb135x_chg *chip, int current_ma);
	int rc = 0;

	/*
	 * If battery is absent do not modify the current at all, these
	 * would be some appropriate values set by the bootloader or default
	 * configuration and since it is the only source of power we should
	 * not change it
	 */
	if (!chip->batt_present) {
		pr_debug("ignoring current request since battery is absent\n");
		return 0;
	}

	if (path == USB) {
		path_current = chip->usb_psy_ma;
		func = smb135x_set_usb_chg_current;