diff options
author | Kevin Hilman <khilman@ti.com> | 2011-03-16 16:13:15 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-09-15 11:39:10 -0700 |
commit | e69c22b1459068f15e56e48b4b6953cc3f566c79 (patch) | |
tree | dd800481a50885786f00d9d7cc3537efad939629 /arch/arm/mach-omap2/voltage.h | |
parent | 048a7034f1044e69868df70bff32d8d67974e1b8 (diff) | |
download | linux-e69c22b1459068f15e56e48b4b6953cc3f566c79.tar.bz2 |
OMAP2+: voltage: keep track of powerdomains in each voltagedomain
When a powerdomain is registered and it has an associated voltage domain,
add the powerdomain to the voltagedomain using voltdm_add_pwrdm().
Also add voltagedomain iterator helper functions to iterate over all
registered voltagedomains and all powerdomains associated with a
voltagedomain.
Modeled after a similar relationship between clockdomains and powerdomains.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/voltage.h')
-rw-r--r-- | arch/arm/mach-omap2/voltage.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index 966aa8880345..5063ab33af7b 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h @@ -19,6 +19,8 @@ #include "vc.h" #include "vp.h" +struct powerdomain; + /* XXX document */ #define VOLTSCALE_VPFORCEUPDATE 1 #define VOLTSCALE_VCBYPASS 2 @@ -55,12 +57,14 @@ struct omap_vfsm_instance_data { * @name: Name of the voltage domain which can be used as a unique identifier. * @scalable: Whether or not this voltage domain is scalable * @node: list_head linking all voltage domains + * @pwrdm_list: list_head linking all powerdomains in this voltagedomain * @vdd: to be removed */ struct voltagedomain { char *name; bool scalable; struct list_head node; + struct list_head pwrdm_list; struct omap_vdd_info *vdd; }; @@ -187,4 +191,9 @@ extern void omap44xx_voltagedomains_init(void); struct voltagedomain *voltdm_lookup(const char *name); void voltdm_init(struct voltagedomain **voltdm_list); int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm); +int voltdm_for_each(int (*fn)(struct voltagedomain *voltdm, void *user), + void *user); +int voltdm_for_each_pwrdm(struct voltagedomain *voltdm, + int (*fn)(struct voltagedomain *voltdm, + struct powerdomain *pwrdm)); #endif |