Thread (18 messages) 18 messages, 3 authors, 2012-01-06
STALE5298d

[PATCH 1/1] regulator/fixed: set constraints.apply_uV to 0

From: Richard Zhao <hidden>
Date: 2012-01-04 02:47:54

Hi Mark,

On Mon, Jan 02, 2012 at 02:39:05PM +0000, Mark Brown wrote:
On Mon, Jan 02, 2012 at 09:46:01PM +0800, Richard Zhao wrote:
quoted
On 1 January 2012 05:59, Mark Brown [off-list ref] wrote:
quoted
quoted
It's not code which is specific to the fixed regulator, it's generic
code that's used by all regulators.
quoted
The original patch is in fixed regulator driver.
Your original patch made no mention of device tree, it just had the
driver modify its constraints which is clearly not good
The fix is in function of_get_fixed_voltage_config. I'll add more comments
in the commit message.
 - aside from the
design issue what happens if we make const data read only?  Any boards
that have their constraints marked const will start oopsing.  Your new
patch makes it impossible to apply a voltage to *any* regulator on a
device tree which is going to break any system that needs to apply a
voltage.
The code is in dt specific function and for dt constraints is not const.
You really need to take a step back, think about the consequences of the
changes you're making and make changes that also make sense at a design
level.  You can't think only about the one board that you're currently
working on, it's important that you consider the wider effects of your
change.
I was thinking at the point of fixed regulator DT binding user.
To repeat my previous suggestions you could either make the system more
forgiving of silly constraints where that makes sense (and remember that
one of the reasons the core rejects silly constraints is that it wants
to make absolutely clear that the user wrote what they meant) or make
sure that silly constraints aren't written in the first place.  For
example, why not make this a device tree specific change?
It is.

Thanks
Richard
quoted
quoted
quoted
Could you please past some code to show your suggested solution,
or you send out a patch to fix it?
quoted
quoted
Not in the immediate future.
quoted
It's a __bug__ blocking others to use fixed regulator with dt binding.
There's some fairly clear and obvious directions to look at and simply
demanding that I drop everything and implement them for you too isn't
really inspiring me to do so.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help