Re: [PATCH v3 0/3] pmdomain: core: add support for domain hierarchies in DT
Ulf Hansson <[email protected]>
| Newsgroups | org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <CAPDyKFr4TdLP825VrpC+gELKOnHHFK=oZ7x8HWQaKFox8Ur0Tg@mail.gmail.com> |
On Tue, 21 Apr 2026 at 01:51, Kevin Hilman (TI) <[email protected]> wrote: > > Currently, PM domains can only support hierarchy for simple > providers (e.g. ones with #power-domain-cells = 0). > > Add support for oncell providers as well by adding a new property > `power-domains-child-ids` to describe the parent/child relationship. > > Also adds the first user of the new API: the Arm SCMI PM domain driver. > > Signed-off-by: Kevin Hilman (TI) <[email protected]> > --- > Changes in v3: > - cleanup return codes for add_child_ids() > - < 0: error > - zero means no child domains present > - > 0: number of child domains added > - arm_scmi: adopt to new return codes (only <0 is an error) > - Link to v2: https://patch.msgid.link/20260410-topic-lpm-pmdomain-child-ids-v2-0-83396e4b5f8b@baylibre.com The v3 series applied for next, thanks! Kind regards Uffe > > Changes compared to initial RFC[2] > - dropped RFC > - rewrote the parse/add function to use iterators/helpers from of.h > - add a remove function for cleanup > - use child domain language instead of subdomain > > This idea was previously discussed on the arm-scmi mailing list[1] > where this approach was proposed by Ulf, and then an initial RFC[2] > implementation was made. From there, it was suggested by Rob[3] to > use a nexus node map instead, which led to several more versions > attempting to implement that, culminating in v5[4], where Rob and > Geert then had second thoughts about the power-domain-map approach. > > Therefore, I've gone back to the approach in the initial RFC[2] to use > the child-ids approach. > > [1] https://lore.kernel.org/arm-scmi/CAPDyKFo_P129sVirHHYjOQT+QUmpymcRJme9obzKJeRgO7B-1A@mail.gmail.com/ > [2] https://lore.kernel.org/all/20250528-pmdomain-hierarchy-onecell-v1-1-851780700c68@baylibre.com/ > [3] https://lore.kernel.org/all/[email protected]/ > [4] https://lore.kernel.org/r/20260122-pmdomain-hierarchy-onecell-v5-0-76855ec856bd@baylibre.com > > Changes in v2: > - dt-bindings: fix warinings from make dt_binding_check > - scmi_pm_domain: switch to dev_err() > - pmdomain: core: fix locking around add/remove domains > - pmdomain: error unwind if any children fail to be added > - pmdomain: fix node reference leak > - pmdomain: ensure power-domains and child-ids properties are same > length before iterating > - Link to v1: https://patch.msgid.link/20260310-topic-lpm-pmdomain-child-ids-v1-0-5361687a18ff@baylibre.com > > --- > Kevin Hilman (TI) (3): > dt-bindings: power: Add power-domains-child-ids property > pmdomain: core: add support for power-domains-child-ids > pmdomain: arm_scmi: add support for domain hierarchies > > Documentation/devicetree/bindings/power/power-domain.yaml | 34 ++++++++++++++++++++++++++++++++++ > drivers/pmdomain/arm/scmi_pm_domain.c | 14 +++++++++++++- > drivers/pmdomain/core.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/pm_domain.h | 16 ++++++++++++++++ > 4 files changed, 230 insertions(+), 1 deletion(-) > --- > base-commit: f7b88edb52c8dd01b7e576390d658ae6eef0e134 > change-id: 20260310-topic-lpm-pmdomain-child-ids-e3d57ae57040 > > Best regards, > -- > Kevin Hilman (TI) <[email protected]> >