Re: [PATCH v2] clk: qcom: clk-rpmh: Make all VRMs optional

From: Dmitry Baryshkov

Date: Tue Apr 14 2026 - 12:25:38 EST


On Tue, Apr 14, 2026 at 01:53:01PM +0200, Konrad Dybcio wrote:
> On 4/14/26 1:34 PM, Alexander Koskovich wrote:
> > Some VRMs aren't present on all boards, so mark them as optional. This
> > prevents probe failures on boards where not all VRMs are present.
> >
> > This resolves an issue seen on the Nothing Phone (4a) (Eliza) where
> > probe fails due to RPMH_RF_CLK5 not being present on the board, this is
> > due to this device having a slightly different PMIC configuration from
> > the Eliza MTP.
> >
> > This matches the downstream approach of marking all VRMs as optional
> > and makes the previous clka_optional handling redundant.
> >
> > Signed-off-by: Alexander Koskovich <akoskovich@xxxxx>
> > ---
> > Changes in v2:
> > - Squashed clka_optional revert into patch (Dmitry)
> > - Simplified patch by just checking if CLK_RPMH_VRM_EN_OFFSET (Konrad)
> > - Squashed cover into patch commit message and expanded on background
> > - Link to v1: https://lore.kernel.org/r/20260412-clk-rpmh-vrm-opt-v1-0-37c890c420ff@xxxxx
> > ---
>
> [...]
>
> > static struct clk_hw *glymur_rpmh_clocks[] = {
> > @@ -951,6 +946,9 @@ static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
> > return ERR_PTR(-EINVAL);
> > }
> >
> > + if (!rpmh->clks[idx])
> > + return ERR_PTR(-ENOENT);
>
> Hm, this is going to surface in some places where a nullptr has been
> happily accepted up until now..
>
> Bjorn, Dmitry, WDYT?

Yep. I'd rather drop that part.

--
With best wishes
Dmitry