Skip to content

RFC PM / shmobile: Pass power domain information via DT (was: Re: [RFD] PM: Device tree representation of power domains)

Rafael J. Wysocki linux-devicetree linux-sh lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest14 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14PM / Domains: Make it possible to use domain names when adding devicesdrivers/base/power/domain.c include/linux/pm_domain.h+56 -130 replies
2/14ARM: shmobile: Use names of power domains for adding devices to themarch/arm/mach-shmobile/board-ap4evb.c arch/arm/mach-shmobile/board-armadillo800eva.c arch/arm/mach-shmobile/board-mackerel.c +4 more+60 -600 replies
3/14ARM: shmobile: Drop r8a7779_add_device_to_domain()arch/arm/mach-shmobile/include/mach/r8a7779.h arch/arm/mach-shmobile/pm-r8a7779.c+4 -130 replies
4/14PM / Domains: Make it possible to use names when adding subdomainsdrivers/base/power/domain.c include/linux/pm_domain.h+38 -10 replies
5/14ARM: shmobile: Use domain names when adding subdomains to power domainsarch/arm/mach-shmobile/include/mach/pm-rmobile.h arch/arm/mach-shmobile/pm-rmobile.c arch/arm/mach-shmobile/setup-r8a7740.c +1 more+5 -140 replies
6/14RM: shmobile: Add routine for automatic PM domains initializationarch/arm/mach-shmobile/include/mach/pm-rmobile.h arch/arm/mach-shmobile/pm-rmobile.c+10 -00 replies
7/14ARM: shmobile: Remove dead sh7372 power management codearch/arm/mach-shmobile/pm-sh7372.c+0 -940 replies
8/14PM / Domains: Add power-on function using names to identify domainsdrivers/base/power/domain.c include/linux/pm_domain.h+36 -150 replies
9/14ARM: shmobile: Move sh7372's PM domain objects to a tablearch/arm/mach-shmobile/include/mach/sh7372.h arch/arm/mach-shmobile/pm-sh7372.c arch/arm/mach-shmobile/setup-sh7372.c+63 -800 replies
10/14ARM: shmobile: Move r8a7740's PM domain objects to a tablearch/arm/mach-shmobile/include/mach/r8a7740.h arch/arm/mach-shmobile/pm-r8a7740.c arch/arm/mach-shmobile/setup-r8a7740.c+28 -270 replies
11/14ARM: shmobile: Move r8a7779's PM domain objects to a tablearch/arm/mach-shmobile/include/mach/r8a7779.h arch/arm/mach-shmobile/pm-r8a7779.c arch/arm/mach-shmobile/setup-r8a7779.c+39 -400 replies
12/14ARM: shmobile: Make rmobile_init_pm_domain() staticarch/arm/mach-shmobile/include/mach/pm-rmobile.h arch/arm/mach-shmobile/pm-rmobile.c+1 -30 replies
13/14PM / Domains: Introduce pm_genpd_present()drivers/base/power/domain.c include/linux/pm_domain.h+27 -00 replies
14/14ARM: shmobile: Add support for storing PM domain information in DTsarch/arm/mach-shmobile/pm-rmobile.c+83 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/14] PM / shmobile: Pass power domain information via DT (was: Re: [RFD] PM: Device tree representation of power domains)
Quoted 18 lines · Rafael J. Wysocki
Quoted 9 lines · Mark Brown
Quoted 6 lines · Rafael J. Wysocki

I actually don't have any ideas how to do that at the moment, but I wonder if anyone has already thought about it?

For one, I don't think that representing a power domain as a platform device would be a good approach and I'm not sure how to represent the relationships between devices and the domains they belong to.

Quoted 7 lines

I guess the OMAP hwmod stuff is the closest thing we've got at the minute (I don't recall seeing any other implementations in mainline) but the hwmods themselves don't appear in the DTS right now. They have a ti,hwmods property on each device naming the hwmod it's in, something like that seems like a reasonable approach, possibly a reference to another DT node rather than or as well as a string? That seems fairly easy.

Quoted 7 lines

Well, it looks like (and please tell me if I'm wrong) the hwmons are just string attributes that are parsed by the platform-specific code through a platform bus type notifier.

We could do that for power domains too, but then each platform wanting to use them would need to implement such a notifier and add its own routine for parsing those strings. Would that be acceptable to everyone concerned?

I tried to follow the above suggestion and prepared the following patchset that allows power domain information for Renesas platforms to be passed as "renesas,pmdomain" string attribute of device nodes. It adds functions allowing the generic PM domains framework to use names for domain identification in various situations and reworks the ARM/shmobile power domains support code to used those functions instead of the "raw" ones that take domain pointers as their arguments. Finally, it defines a platform bus type notifier that will add devices whose DT nodes contain the "renesas,pmdomain" attribute to the power domains indicated by it (the value of that attribute should be the name of the PM domain to add the device to after it's been registered). All of this should allow platform devices to be added to appropriate power domains automatically based on the information read from a DT.

The patches are on top of the current linux-next tree.

I've tested the patches that could be tested on the Mackerel board, except for the last one (I'm still working on testing it).

Thanks,
Rafael