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

Commit 59c517bd 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: type detection cleanup"

parents 0eaf3ba4 e72e1e33
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1288,15 +1288,16 @@ static int handle_usb_insertion(struct smb135x_chg *chip)
		dev_err(chip->dev, "Couldn't read status 5 rc = %d\n", rc);
		return rc;
	}
	usb_type_name = get_usb_type_name(reg);
	usb_supply_type = get_usb_supply_type(reg);
	/*
	 * Report the charger type as UNKNOWN if the
	 * apsd-fail flag is set. This nofifies the USB driver
	 * to initiate a s/w based charger type detection.
	 */
	if (chip->workaround_flags & WRKARND_APSD_FAIL)
		usb_supply_type = POWER_SUPPLY_TYPE_UNKNOWN;
		reg = 0;

	usb_type_name = get_usb_type_name(reg);
	usb_supply_type = get_usb_supply_type(reg);
	pr_debug("inserted %s, usb psy type = %d stat_5 = 0x%02x\n",
			usb_type_name, usb_supply_type, reg);
	if (chip->usb_psy) {