Subject: [PATCH 2/9] ARM: OMAP2+: SmartReflex: move the driver specific macros in include/linux/power

From: [email-masked] (Arnd Bergmann)
Date: Thu, 19 Apr 2012 13:54:38 +0000

On Thursday 05 April 2012, Trilok Soni wrote:
> >> Couple of suggestions:
> >>
> >> drivers/platform/omap/avs?
> >> drivers/misc/omap/avs?
> >>

I would definitely prefer something under drivers/power,
drivers/regulators or a new top-level directory under
drivers.

> >>> IIRC, David Brownell was referring to the rule of three for such case.
> >>> Meaning that it worth having a generic fmwk when at least three
> >>> different drivers are doing the same kind of things.
> >
> > Do OMAP v1 and OMAP v2 implementations count as 2 drivers? ;-)
> > More seriously, the OMAP code for SmartReflex is far from complete in
> > mainline. There is a plan to provide the following features:
> > - OMAP v1 IP,
> > - OMAP v2 IP,
> > - class 1.5,
> > - class 3,
> > - class 3.5,
> > - and more support for the upcoming chipsets.
> 
> I don't understand much of these versions right now, but hopefully after 
> going through all these docs. My only contention point is to not create 
> any directory into the drivers/power, unless it is generic fwk and then 
> build up "client" drivers on top of it. Meanwhile we could move this 
> driver into above options as I have suggested.

I think creating the directory in the place where we want the files
to stay in the long run is ok, if the plan is to add more drivers and
make the base code more generic. We don't have to wait until it's too
late and we absolutely need a framework ;-)

The part I don't understand is how this relates to the regulator framework.
Is there any overlap between the functionality provided by the
smartreflex framework and the regulator framework? If so, would it be
better to extend the existing framework so it can do smartreflex as well?

	Arnd