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

Commit afd081af authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

power: smb-lib: skip DPDM regulator request during pr_swap



During pr_swap from source to sink charger hardware will receive
a plug-in event and request for DPDM regulator, this will reset
USB's state machine. Fix this by skipping DPDM request during
pr_swap.

Change-Id: I44d558d73e94709e9ac09f3e8817037d5c4a8670
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 7cc55261
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -510,6 +510,9 @@ static int smblib_request_dpdm(struct smb_charger *chg, bool enable)
{
	int rc = 0;

	if (chg->pr_swap_in_progress)
		return 0;

	/* fetch the DPDM regulator */
	if (!chg->dpdm_reg && of_get_property(chg->dev->of_node,
				"dpdm-supply", NULL)) {