On Wed, Jul 13, 2011 at 05:00:35PM +0300, Tero Kristo wrote:

> +config REGULATOR_OMAP_SMPS
> +     tristate "TI OMAP SMPS Power Regulators"
> +     depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM && TWL4030_CORE

What is the dependency on the TWL4030?  I see no references to it in the
code...

> +     for (i = 0; i < pdata->num_regulators; i++) {
> +             initdata = pdata->regulators[i];
> +

I do strongly prefer the idiom of just registering all the regulators
even if they're read only.

> +             c = &initdata->constraints;
> +             c->valid_modes_mask &= REGULATOR_MODE_NORMAL;
> +             c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE;
> +             c->always_on = true;

No, this is bad.  We *always* pay attention to the constraints the user
set even if they're nuts or won't work, the machine driver has the final
say on what is or isn't allowed on a given board.  The mode setting is
especially suspect as there's no mode support in the driver.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to