Subject: Re: Regulator support for smsc911x

From: Mark Brown <[email-masked]>
Date: Tue, 7 Feb 2012 19:39:14 +0000

On Tue, Feb 07, 2012 at 05:25:48PM -0200, Fabio Estevam wrote:
> On Fri, Feb 3, 2012 at 9:11 AM, Mark Brown

> > There's also options c) set up the regulators for the board and d) don't
> > enable the regulator API if the board doesn't use regulators.

> Option c would require that we change every single board.

Well, yes.

> The patch below does option d.

> What do you think?

Absolutely not.  Putting conditional code like this in drivers is nuts,
you would have to do the same thing in every single driver which is not
a useful use of anyone's time.  This is *clearly* a generic thing and
should therefore be handled in generic code for the same reason we don't
have driver specific platform data for actual usage of the API.

Really, anyone who wants this sort of thing should just enable dummy
regulators - it's exactly what you're implementing.  I'm pretty sure
your board does actually have power supplies for the chip, you've just
not told software about them.