Re: [PATCH v2 3/8] clk: qcom: gpucc-sc8280xp: Add external supply for GX gdsc

From: Bjorn Andersson
Date: Mon Jan 08 2024 - 13:23:55 EST


On Wed, Dec 27, 2023 at 02:07:52AM +0100, Konrad Dybcio wrote:
> On 22.12.2023 05:39, Bjorn Andersson wrote:
> > On SA8295P and SA8540P the GFX rail is powered by a dedicated external
> > regulator, instead of the rpmh-controlled "gfx.lvl".
> >
> > Define the "vdd-gfx" as the supply regulator for the GDSC, to cause the
> > gdsc logic to look for, and control, this external power supply.
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > Signed-off-by: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx>
> > ---
> Worth noting the regulator framework will create a virtual supply
> for the normal 8280
>

You're right. No functional harm, but that's not very nice.

I don't think we have any benefit from having a dummy supply, if the DT
author failed to provide a proper one, so it seems reasonable to switch
gdsc to devm_regulator_get_optional().

Regards,
Bjorn

> Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
>
> Konrad