Thread (6 messages) flat view 6 messages, 2 authors, 2012-07-03
DORMANTno replies

[PATCH] can: flexcan: add a regulator for transceiver

From: Mark Brown <hidden>
Date: 2012-07-03 16:56:35
Also in: linux-can

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:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help