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

Commit ecad6475 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Manu Gautam
Browse files

USB: phy: msm: Set usb bam device after block reset



Currently usb bam device is set at the end of probe function.
This results in usb bam driver probe running before block reset.
Due to this, if usb bam is enabled during boot, bam enable bit
in BAM CTRL will gets cleared when block reset is performed and
results in BAM2BAM path not working for first time. Hence fix this
by setting usb bam device after block reset is done.

Change-Id: I258802eb509f5b761d3a73f7efb2f6142d7334ee
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 8e6fdb81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3275,7 +3275,7 @@ static int usb_bam_probe(struct platform_device *pdev)
	dev_dbg(&pdev->dev, "usb_bam_probe\n");

	if (!usb_device) {
		pr_err("OTG not yet probed\n");
		dev_dbg(&pdev->dev, "OTG not yet probed\n");
		return -EPROBE_DEFER;
	}

+1 −2
Original line number Diff line number Diff line
@@ -3320,6 +3320,7 @@ static void msm_otg_sm_work(struct work_struct *w)
	switch (otg->phy->state) {
	case OTG_STATE_UNDEFINED:
		msm_otg_reset(otg->phy);
		msm_bam_set_usb_dev(otg->phy->dev);
		msm_otg_init_sm(motg);
		if (!psy && legacy_power_supply) {
			psy = power_supply_get_by_name("usb");
@@ -6168,8 +6169,6 @@ static int msm_otg_probe(struct platform_device *pdev)
	register_pm_notifier(&motg->pm_notify);
	msm_otg_dbg_log_event(phy, "OTG PROBE", motg->caps, motg->lpm_flags);

	msm_bam_set_usb_dev(&pdev->dev);

	return 0;

remove_cdev: