[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yjal62st6dx3x7jv7lz42xfkw6xyzc6b4sfcvdzigcf6ivkyp7@xmwy647h3ohm>
Date: Tue, 16 Sep 2025 13:19:19 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Kamal Wadhwa <kamal.wadhwa@....qualcomm.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>, linux-arm-msm@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH 3/4] regulator: rpmh-regulator: Add support for new
resource name format
On Tue, Sep 16, 2025 at 01:28:17PM +0530, Kamal Wadhwa wrote:
> Currently rpmh-regulator resource name follows this format:
Mention that it's a resource name inside cmd-db.
With that fixed
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> `^(ldo|smp|bob|vs)[a-n][1-9][0-9]?$`
>
> (eg - ldob11, smpa2, bobc1 etc)
>
> Here `[a-n]` in the resource name signifies the `pmic-id`.
> However, newer firmware follows a different format that also
> includes the `bus_id` as well in the resource name.
>
> New format:
> `^(L|S|B)[1-9][0-9]?[A-N]_E[0-3]$`
>
> (eg - L11B_E1, S2A_E0, B1C_E0 etc)
>
> Here `_E[0-3]` at the end is the `bus_id`, and upper case `[A-N]`
> is used to denote `pmic-id`, while the regulator `(ldo|smp|bob)`
> is replaced with their initials in upper case `(L|S|B|VA)`.
>
> To handle this properly, do the following:
>
> - Remove the `resource_name` member from vreg init data
>
> - Add `index` and `regulator_hw_type` new members, which will
> contain the index number and the regulator hardware type
> (SMPS/LDO/BOB/VS) which can be combined with the pmic-id read
> from the devicetree to generate the resource_name.
>
> - Choose new resource name format if `pmic-id` contains `_E`
> in it, else fallback to old format.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> Signed-off-by: Kamal Wadhwa <kamal.wadhwa@....qualcomm.com>
> ---
> drivers/regulator/qcom-rpmh-regulator.c | 1134 ++++++++++++++++---------------
> 1 file changed, 586 insertions(+), 548 deletions(-)
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists