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

Commit 60535a9c authored by Vatsal Bucha's avatar Vatsal Bucha Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: Add pm_stay_awake and pm_relax for FSA4480



Fsa driver schedules work to send usbc plug event notificaions
to mbhc but does not hold the system supend.
Add pm calls to hold system suspend
until mbhc notification is complete.

Change-Id: I31116844c592a8d2525605036cb7f0588aadf11f
Signed-off-by: default avatarVatsal Bucha <vbucha@codeaurora.org>
parent 3b3e314b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ static int fsa4480_usbc_event_changed(struct notifier_block *nb,

		dev_dbg(dev, "%s: queueing usbc_analog_work\n",
			__func__);
		pm_stay_awake(fsa_priv->dev);
		schedule_work(&fsa_priv->usbc_analog_work);
		break;
	default:
@@ -293,6 +294,7 @@ static void fsa4480_usbc_analog_work_fn(struct work_struct *work)
	}
	fsa4480_usbc_analog_setup_switches(fsa_priv,
		atomic_read(&(fsa_priv->usbc_mode)) != POWER_SUPPLY_TYPEC_NONE);
	pm_relax(fsa_priv->dev);
}

static void fsa4480_update_reg_defaults(struct regmap *regmap)