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

Commit fd40f97b authored by Vatsal Bucha's avatar Vatsal Bucha
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 1cef27dd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -124,6 +124,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:
@@ -327,6 +328,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)