Re: [PATCH v3 1/4] media: qcom: camss: Add PM clock support and integrate with runtime PM

Loic Poulain <[email protected]> Fri, 31 Jul 2026 10:31:07 +0200
Newsgroups org.kernel.vger.linux-media,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <CAFEp6-0fa-TwcyHd5aSRdQ_ioBEFg+YvjDz7kOD2eHphqJt_yw@mail.gmail.com>
Hi Bryan,

On Thu, Jul 30, 2026 at 9:34 PM Bryan O'Donoghue
<[email protected]> wrote:
>
> On 30/07/2026 10:24, Loic Poulain wrote:
> > +     ret = camss_init_pm_clks(camss);
> > +     if (ret)
> > +             goto err_v4l2_device_unregister;
> > +
>
> I don't think this makes sense if !CONFIG_PM_CLK
>
> ->
>
> I don't think the read routine in patch #4 should happen if
> !CONFIG_PM_CLK either.

These clocks are required by the other subdevices/blocks regardless,
so they need to remain enabled. The simplest fix is therefore to
handle both cases in the initialization helper, use the PM clock
framework when CONFIG_PM_CLK is enabled, and fall back to the regular
clock framework otherwise (which should only occur in the
unlikely/compile-test event that CONFIG_PM_CLK is disabled).

Regards,
Loic