[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120207193914.GA31557@opensource.wolfsonmicro.com>
Date: Tue, 7 Feb 2012 19:39:14 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Fabio Estevam <festevam@...il.com>
Cc: Sascha Hauer <s.hauer@...gutronix.de>,
robert.marklund@...ricsson.com, netdev@...r.kernel.org,
Sascha Hauer <kernel@...gutronix.de>
Subject: Re: Regulator support for smsc911x
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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists