From e69c22b1459068f15e56e48b4b6953cc3f566c79 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Wed, 16 Mar 2011 16:13:15 -0700 Subject: 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 --- arch/arm/mach-omap2/powerdomain.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-omap2/powerdomain.c') diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 984457d..5164d58 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -99,6 +99,8 @@ static int _pwrdm_register(struct powerdomain *pwrdm) return -EINVAL; } pwrdm->voltdm.ptr = voltdm; + INIT_LIST_HEAD(&pwrdm->voltdm_node); + voltdm_add_pwrdm(voltdm, pwrdm); list_add(&pwrdm->node, &pwrdm_list); -- cgit v1.1