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

Richard Zhao richard.zhao at freescale.com
Tue Jan 3 21:47:54 EST 2012


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:
> 
> > On 1 January 2012 05:59, Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:
> 
> > > It's not code which is specific to the fixed regulator, it's generic
> > > code that's used by all regulators.
> 
> > 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
> 
> > >> Could you please past some code to show your suggested solution,
> > >> or you send out a patch to fix it?
> 
> > > Not in the immediate future.
> 
> > 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.




More information about the linux-arm-kernel mailing list