Re: [PATCH] pmdomain: core: fix "sd_count" field setting
From: Ulf Hansson
Date: Mon Oct 28 2024 - 18:00:05 EST
On Mon, 28 Oct 2024 at 16:07, Dario Binacchi
<dario.binacchi@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Oct 28, 2024 at 2:34 PM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> >
> > On Thu, 24 Oct 2024 at 11:49, Dario Binacchi
> > <dario.binacchi@xxxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > The "sd_count" field keeps track of the number of subdomains with power
> > > "on," so if pm_genpd_init() is called with the "is_off" parameter set to
> > > false, it means that the power domain is already on, and therefore its
> > > "sd_count" must be 1.
> >
> > genpd_sd_counter_inc() is being called when adding subdomains. Doesn't
> > that work correctly for you?
>
> In my use case the genpd_add_subdomain() is not called.
> I am working on :
> drivers/pmdomain/imx/gpcv2.c
> drivers/pmdomain/imx/imx8m-blk-ctrl.c
In that case you don't have a child-domain (subdomain), which means
the sd_count should be 0.
[...]
Kind regards
Uffe