> -----Original Message----- > From: Kevin Hilman [mailto:khilman@xxxxxx] > Sent: Friday, February 04, 2011 9:07 PM > To: Vishwanath BS > Cc: linux-omap@xxxxxxxxxxxxxxx; patches@xxxxxxxxxx; Thara Gopinath > Subject: Re: [PATCH 04/13] OMAP: Introduce dependent voltage domain > support > > Vishwanath BS <vishwanath.bs@xxxxxx> writes: > > > There could be dependencies between various voltage domains for > > maintaining system performance or hardware limitation reasons > > like VDD<X> should be at voltage v1 when VDD<Y> is at voltage v2. > > This patch introduce dependent vdd information structures in the > > voltage layer which can be used to populate these dependencies > > for a voltage domain. This patch also adds support to scale > > the dependent vdd and the scalable devices belonging to it > > during the scaling of a main vdd through omap_voltage_scale. > > > > As part of this, some of the voltage layer structure definitions are > moved from > > voltage.c to voltage.h as it needs to be used in the dvfs layer for > dependency > > voltage handling. > > IMO, it would be cleaner to keep this in the voltage layer, and create > and API for dependencies. Dependency voltage handling needs some of dvfs layer functions (like omap_dvfs_add_vdd_user, omap_dvfs_voltage_scale). Given that dvfs layer is built on top of voltage layer, if these functions need to be implemented in voltage layer, then voltage layer will end up using dvfs functions leading to cross dependencies. So I thought keeping this implementation in dvfs layer makes it more structured. > > > Based on original patch from Thara. > > > > Signed-off-by: Vishwanath BS <vishwanath.bs@xxxxxx> > > Cc: Thara Gopinath <thara@xxxxxx> > > --- > > arch/arm/mach-omap2/dvfs.c | 87 > +++++++++++++++++ > > arch/arm/mach-omap2/voltage.c | 117 ----------------------- > > arch/arm/plat-omap/include/plat/voltage.h | 148 > +++++++++++++++++++++++++++++ > > 3 files changed, 235 insertions(+), 117 deletions(-) > > > > diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach- > omap2/dvfs.c > > index cefc2be..c9d3894 100755 > > --- a/arch/arm/mach-omap2/dvfs.c > > +++ b/arch/arm/mach-omap2/dvfs.c > > @@ -85,6 +85,7 @@ struct omap_vdd_dvfs_info { > > struct mutex scaling_mutex; /* dvfs mutex */ > > struct voltagedomain *voltdm; > > struct list_head dev_list; > > + struct device vdd_device; > > It's not clear what the usage of this device is for. > > It is never initialized, but seems to be used as a dummy device when > calcluating dependencies. Needs clarification. This device is used for placing voltage request (omap_dvfs_add_vdd_user) when dealing with dependent vdds. Eg: while scaling MPU VDD, we also scale CORE VDD. So while placing voltage request for CORE VDD, this vdd_device of MPU is used as the requesting device so that this request is stored as a separate user. Vishwa > > Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html