[PATCH] can: flexcan: add a regulator for transceiver
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue Jul 3 12:56:35 EDT 2012
On Tue, Jul 03, 2012 at 11:28:15PM +0800, Shawn Guo wrote:
> On Tue, Jul 03, 2012 at 03:46:47PM +0100, Mark Brown wrote:
> > No, I really do mean a fixed voltage regulator. Dummy regulators should
> > essentially never be used in production.
> In that case, my patch may need to stay unchanged. Some systems have
> a supply controlled by gpio and we need to have it be a Linux regulator
> to switch it, while other systems have the supply non-switchable which
> can be reasonably invisible to software. That said, the regulator is
> optional and the failure of devm_regulator_get should not make the
> driver probe fail.
No, really.
> I guess your suggestion here is to make the regulator mandatory for
> the driver, which means those non-switchable supplies have to be
> also defined as Linux regulators for every single system. I'm not
> sure we want to do that just for saving a regulator pointer check.
If we go down that route what we need to do is to go through and remove
all error checking for failure to get regulators and make the regulator
API silently handle this since exactly the same thing applies to almost
every supply in the system.
What we shouldn't be doing is open coding this stupidity in every single
regulator API user, that's just a pointless waste of everyone's time.
More information about the linux-arm-kernel
mailing list