Re: [PATCHv3 4/6] omap3: pmic: add API to get common SMPS regulators

Tero Kristo
2011-07-19T08:07:24Z

On Mon, 2011-07-18 at 20:23 +0200, Balbi, Felipe wrote:
> Hi,
>
> On Mon, Jul 18, 2011 at 08:35:20PM +0300, Tero Kristo wrote:
> > diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
> > index 5e83a5b..fde8467 100644
> > --- a/arch/arm/mach-omap2/twl-common.h
> > +++ b/arch/arm/mach-omap2/twl-common.h
> > @@ -25,6 +25,11 @@
> > #define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)
> > #define TWL_COMMON_REGULATOR_VPLL2 (1 << 5)
> >
> > +/* TWLxxxx SMPS regulators */
> > +#define SMPS_COMMON_REGULATOR_MPU (1 << 0)
> > +#define SMPS_COMMON_REGULATOR_CORE (1 << 1)
> > +#define SMPS_COMMON_REGULATOR_IVA (1 << 2)
> > +#define SMPS_COMMON_REGULATOR_MPU_IVA (1 << 3)
> >
> > struct twl4030_platform_data;
> >
> > @@ -56,4 +61,13 @@ void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
> > void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
> > u32 pdata_flags, u32 regulators_flags);
> >
> > +void omap_pmic_get_smps_config(struct platform_device *smps_dev,
> > + u32 smps_flags);
> > +
> > +static inline void omap3_pmic_get_smps_config(struct platform_device *smps_dev)
> > +{
> > + omap_pmic_get_smps_config(smps_dev, SMPS_COMMON_REGULATOR_MPU_IVA |
> > + SMPS_COMMON_REGULATOR_CORE);
> > +}
>
> if these are specific to OMAP SoC, why do they come on twl-common.h
> header ?
>

I was wondering about this myself too and was almost certain that
someone will ask about it. I decided to follow the easy path for this
version though for comments. Anyway, which would be the best option for
this:
1) just add them into twl-common
2) rename twl-common to something else and add these
3) add a completely new file + header for the smps regulator support