Re: [PATCH] regulator: Provide dummy supply support

From: Mike Frysinger
Date: Tue Nov 01 2011 - 13:50:23 EST


On Friday 28 October 2011 18:47:57 Sascha Hauer wrote:
> On Fri, Oct 28, 2011 at 11:59:31PM +0200, Mark Brown wrote:
> > On Fri, Oct 28, 2011 at 10:26:58PM +0200, Sascha Hauer wrote:
> > > drivers/regulator/Makefile | 2 +-
> > > drivers/regulator/dummy-supply.c | 88
> > > +++++++++++++++++++++++++++++++++++++
> >
> > We already have a dummy regulator driver and a fixed voltage regulator
> > driver, we shouldn't be adding a third implementation of the same thing.
> > Just use the fixed voltage regulator for this.
>
> I explained in my mail why I think that the current implementation of
> the dummy regulator is not suitable for things apart from debugging.

your complaints seem to be specific to how the dummy regulator gets hooked in
and not in the specific regulator implementation. so it seems like the right
thing would be to split the kconfig knobs:

config REGULATOR_DUMMY
- bool "Provide a dummy regulator if regulator lookups fail"
+ bool "Provide a dummy regulator"
+config REGULATOR_DUMMY_FALLBACK
+ bool "Fallback to dummy regulator if lookup fails"
+ depends on REGULATOR_DUMMY

(and then obviously update the .c files accordingly)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.