Hi,

On Wed, Nov 23, 2011 at 12:30:54PM +0100, Jean Pihet wrote:
> >> On Wed, Nov 23, 2011 at 10:51 AM, Felipe Balbi <[email protected]> wrote:
> >> > On Tue, Nov 22, 2011 at 04:06:09PM +0100, [email protected] 
> >> > wrote:
> >> >> +config POWER_AVS_OMAP_V1
> >> >> +     tristate "AVS support for the OMAP IP version 1"
> >> >> +     depends on ARCH_OMAP3 && PM
> >> >> +     help
> >> >> +       Say Y to enable AVS support on OMAP containing the version 1 of
> >> >> +       the SmartReflex IP.
> >> >> +       V1 is the 65nm version used in OMAP3430.
> >> >> +
> >> >> +       Please note, that by default SmartReflex is only
> >> >> +       initialized. To enable the automatic voltage
> >> >> +       compensation for vdd mpu  and vdd core from user space,
> >> >> +       user must write 1 to
> >> >> +             /debug/voltage/vdd_<X>/smartreflex/autocomp,
> >> >> +       where X is mpu or core for OMAP3.
> >> >> +       Optionally autocompensation can be enabled in the kernel
> >> >> +       by default during system init via the enable_on_init flag
> >> >> +       which an be passed as platform data to the smartreflex driver.
> >> >> +
> >> >> +config POWER_AVS_OMAP_V2
> >> >> +     tristate "AVS support for the OMAP IP version 2"
> >> >> +     depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM
> >> >> +     help
> >> >> +       Say Y to enable AVS support on OMAP containing the version 2 of
> >> >> +       the SmartReflex IP.
> >> >> +       V2 is the update for the 45nm version of the IP used in OMAP3630
> >> >> +       and OMAP4430
> >> >
> >> > can't you read the revision register and decide this in runtime ?
> >> Those Kconfig options are used to compile the v1 and/or v2 drivers.
> >> The init of v1 or v2 is decided at runtime, cf. the sr_init functions
> >> where the cpu revision is checked. Is this the correct check?
> >
> > if you already decide in runtime the correct initialization to call, why
> > do you add ifdefs ?
> There is no #ifdef with CONFIG_POWER_AVS_OMAP_V[12], those options are
> used to compile or not the respective modules, cf.
> driver/power/avs/Makefile.

separate modules ? Can't that be combined into one driver only ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to