[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7271846f-c03f-4d0f-a54b-7424ddd72724@linaro.org>
Date: Fri, 5 Jan 2024 21:15:49 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regulator: qcom_smd: Keep one rpm handle for all vregs
On 5.01.2024 17:31, Mark Brown wrote:
> On Wed, Jan 03, 2024 at 09:18:37PM +0100, Konrad Dybcio wrote:
>
>> - rpm = dev_get_drvdata(pdev->dev.parent);
>> - if (!rpm) {
>> + smd_vreg_rpm = dev_get_drvdata(pdev->dev.parent);
>> + if (!smd_vreg_rpm) {
>> dev_err(&pdev->dev, "Unable to retrieve handle to rpm\n");
>> return -ENODEV;
>> }
>
> It'd be slightly more robust to have a check here that we do get the
> same RPM back if the variable is already set, just on the off chance
> that something changes in some future system and we do end up with a
> second RPM somehow.
Knowing how improbable this is (currently RPM is responsible for almost all
power and some clock rails, including DDR), I'd say it's excessive, but if
you wish, I can add it.
Konrad
Powered by blists - more mailing lists