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

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

Merge "power: smb1351-charger: Increase the HVDCP detection delay"

parents e8d852f1 6c128a45
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -2911,7 +2911,7 @@ end:
	smb1351_relax(&chip->smb1351_ws, HVDCP_DETECT);
}

#define HVDCP_NOTIFY_MS 2500
#define HVDCP_NOTIFY_MS 3500
static int smb1351_apsd_complete_handler(struct smb1351_charger *chip,
						u8 status)
{
@@ -2943,6 +2943,7 @@ static int smb1351_apsd_complete_handler(struct smb1351_charger *chip,
		 * If defined force hvdcp 2p0 property,
		 * we force to hvdcp 2p0 in the APSD handler.
		 */
		if (type == POWER_SUPPLY_TYPE_USB_DCP) {
			if (chip->force_hvdcp_2p0) {
				pr_debug("Force set to HVDCP 2.0 mode\n");
				smb1351_masked_write(chip, VARIOUS_FUNC_3_REG,
@@ -2951,13 +2952,14 @@ static int smb1351_apsd_complete_handler(struct smb1351_charger *chip,
						CMD_FORCE_HVDCP_2P0_BIT,
						CMD_FORCE_HVDCP_2P0_BIT);
				type = POWER_SUPPLY_TYPE_USB_HVDCP;
		} else if (type == POWER_SUPPLY_TYPE_USB_DCP) {
			} else {
				pr_debug("schedule hvdcp detection worker\n");
			smb1351_stay_awake(&chip->smb1351_ws, HVDCP_DETECT);
				smb1351_stay_awake(&chip->smb1351_ws,
							HVDCP_DETECT);
				schedule_delayed_work(&chip->hvdcp_det_work,
					msecs_to_jiffies(HVDCP_NOTIFY_MS));
			}

		}
		power_supply_set_supply_type(chip->usb_psy, type);
		/*
		 * SMB is now done sampling the D+/D- lines,