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

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

Merge "usb: phy-msm-susb-qmp: Add checks to check clk_enabled"

parents a18db927 74b80978
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -484,6 +484,7 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend)
		/* Make sure above write completed with PHY */
		wmb();

		if (phy->clk_enabled) {
			clk_disable_unprepare(phy->cfg_ahb_clk);
			clk_disable_unprepare(phy->aux_clk);
			clk_disable_unprepare(phy->pipe_clk);
@@ -492,6 +493,7 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend)
			if (phy->ref_clk_src)
				clk_disable_unprepare(phy->ref_clk_src);
			phy->clk_enabled = false;
		}
		phy->in_suspend = true;
		msm_ssphy_power_enable(phy, 0);
		dev_dbg(uphy->dev, "QMP PHY is suspend\n");