Linux-PHY Archive mirror
 help / color / mirror / Atom feed
From: Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Vinod Koul <vkoul@kernel.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-phy@lists.infradead.org>, <quic_ppratap@quicinc.com>,
	<quic_jackp@quicinc.com>
Subject: Re: [PATCH] phy: qcom-snps: Fixed order of enabling regulators
Date: Wed, 21 Feb 2024 17:10:07 +0530	[thread overview]
Message-ID: <00bd50ed-bc7c-482f-b126-321d1ac9228d@quicinc.com> (raw)
In-Reply-To: <CAA8EJprMd5tr91gm99GyP1oefO_=tNQzxKA6hmB-xtBNVTbeeQ@mail.gmail.com>



On 2/21/2024 4:26 PM, Dmitry Baryshkov wrote:
> On Wed, 21 Feb 2024 at 12:32, Krishna Kurapati > <quic_kriskura@quicinc.com> wrote:
[...]
>> ---
>>
>> Downstream kernels on QC targets use this sequence to power up
>> the phy and this has been tested extensively on multiple targets.
>> This change has been tested with upstream kernel on QCM6490-IDP
>> without EUD to ensure there is no loss or breakage of functionality.
>>
>>   drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
>> index eb0b0f61d98e..e86d221b7397 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c
>> @@ -79,7 +79,7 @@
>>   #define LS_FS_OUTPUT_IMPEDANCE_MASK            GENMASK(3, 0)
>>
>>   static const char * const qcom_snps_hsphy_vreg_names[] = {
>> -       "vdda-pll", "vdda33", "vdda18",
>> +       "vdda-pll", "vdda18", "vdda33",
> 
> NAK.
> The driver uses regulator_bulk_enable, which enables all three
> regulators simultaneously via async calls, thus your change doesn't
> have any effect.
> 
Hi Dmitry,

  Thanks for this information. I thought it was synchronous but you are 
right, I see in code they are async:

                 async_schedule_domain(regulator_bulk_enable_async,
                                       &consumers[i], &async_domain);

  I think separating them out and calling regulator_enable on each one 
might work out.

> Also note, that these regulators are frequently shared between
> different consumers. As such, even if you have tight control of
> regulator ordering in the driver, other drivers might enable
> corresponding regulators on their own, breaking the ordering.
> 

You are right. Let me check how the phy regulators are allocated in 
different femto phy targets.

Thanks for the review.

Regards,
Krishna,

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

      reply	other threads:[~2024-02-21 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 10:32 [PATCH] phy: qcom-snps: Fixed order of enabling regulators Krishna Kurapati
2024-02-21 10:56 ` Dmitry Baryshkov
2024-02-21 11:40   ` Krishna Kurapati PSSNV [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00bd50ed-bc7c-482f-b126-321d1ac9228d@quicinc.com \
    --to=quic_kriskura@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).