From: Stephen Boyd Subject: Re: [PATCH v1 4/6] phy: qcom-qusb2: Add support for runtime PM Date: Fri, 21 Jul 2017 10:24:03 -0700 Message-ID: <4b267088-e925-0842-9773-b5634565618c@codeaurora.org> References: <1500634921-25914-1-git-send-email-mgautam@codeaurora.org> <1500634921-25914-5-git-send-email-mgautam@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1500634921-25914-5-git-send-email-mgautam@codeaurora.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Manu Gautam , Kishon Vijay Abraham I , Felipe Balbi Cc: linux-arm-msm@vger.kernel.org, Vivek Gautam , Krzysztof Kozlowski , Viresh Kumar , "open list:GENERIC PHY FRAMEWORK" List-Id: linux-arm-msm@vger.kernel.org On 07/21/2017 04:01 AM, Manu Gautam wrote: > Driver can turn off clocks during runtime suspend. > Also, runtime suspend is not as a result of host mode > selective suspend then PHY can be powered off as well. > > Signed-off-by: Manu Gautam > > diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c > index fa60a99..b505681 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c > +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c > @@ -132,6 +132,9 @@ struct qusb2_phy { > > const struct qusb2_phy_cfg *cfg; > bool has_se_clk_scheme; > + bool phy_initialized; > + bool powered_on; Is the powered_on flag here because the controller driver has unbalanced power on calls to the phy? Same comment applies for the phy_initialized flag. Both of these look like workarounds for some odd behavior in the controller driver. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project