Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-30 Thread Mark Brown
On Wed, Mar 30, 2016 at 09:07:21AM +, Haibo Chen wrote: Please fix your mail client to word wrap within paragraphs at something substantially less than 80 columns. Doing this makes your messages much easier to read and reply to. > In our sdhci.c, we call the function > regulator_set_voltage

RE: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-30 Thread Haibo Chen
vger.kernel.org [mailto:linux-mmc- > ow...@vger.kernel.org] On Behalf Of Mark Brown > Sent: Wednesday, March 30, 2016 2:27 AM > To: Geert Uytterhoeven > Cc: Bjorn Andersson ; Krzysztof Kozlowski > ; Ivaylo Dimitrov ; > Liam Girdwood ; linux-kernel@vger.kernel.org; Ulf > Hansson ;

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-29 Thread Mark Brown
On Tue, Mar 29, 2016 at 08:05:34PM +0200, Geert Uytterhoeven wrote: > sh_mobile_sdhi ee10.sd: Got WP GPIO > ==> sh_mobile_sdhi ee10.sd: could not set regulator OCR (-22) > gpio_rcar e6055400.gpio: sense irq = 6, type = 3 > sh_mobile_sdhi ee10.sd: mmc0 base a

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-29 Thread Geert Uytterhoeven
On Tue, Mar 29, 2016 at 4:58 PM, Mark Brown wrote: > On Tue, Mar 29, 2016 at 02:00:52PM +0200, Geert Uytterhoeven wrote: >> On Sun, Mar 27, 2016 at 11:08 AM, Mark Brown wrote: > >> > The existing check in the patch should be an || not an ==, or possibly >> > we should just not bother looking for

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-29 Thread Mark Brown
On Tue, Mar 29, 2016 at 02:00:52PM +0200, Geert Uytterhoeven wrote: > On Sun, Mar 27, 2016 at 11:08 AM, Mark Brown wrote: > > The existing check in the patch should be an || not an ==, or possibly > > we should just not bother looking for min_uV at all. I just pushed out > > a version of that, l

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-29 Thread Geert Uytterhoeven
Hi Mark, On Sun, Mar 27, 2016 at 11:08 AM, Mark Brown wrote: > On Sat, Mar 26, 2016 at 04:50:41PM -0700, Bjorn Andersson wrote: > >> Reinstating the following snippet in of_get_regulation_constraints() >> sort this out: > >> if (constraints->min_uV && constraints->max_uV) >>

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-28 Thread Bjorn Andersson
On Sun, Mar 27, 2016 at 2:08 AM, Mark Brown wrote: > On Sat, Mar 26, 2016 at 04:50:41PM -0700, Bjorn Andersson wrote: > >> Reinstating the following snippet in of_get_regulation_constraints() >> sort this out: > >> if (constraints->min_uV && constraints->max_uV) >>

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-27 Thread Mark Brown
On Sat, Mar 26, 2016 at 04:50:41PM -0700, Bjorn Andersson wrote: > Reinstating the following snippet in of_get_regulation_constraints() > sort this out: > if (constraints->min_uV && constraints->max_uV) >constraints->apply_uV = true; The existing check in

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-26 Thread Bjorn Andersson
On Thu, Mar 24, 2016 at 12:18 AM, Krzysztof Kozlowski wrote: > On Thu, Mar 24, 2016 at 3:11 PM, Krzysztof Kozlowski > wrote: >> On Tue, Mar 22, 2016 at 6:06 AM, Ivaylo Dimitrov >> wrote: >>> Hi, >>> >>> On 21.03.2016 21:18, Mark Brown wrote: Currently we only attempt to set the voltage

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-24 Thread Krzysztof Kozlowski
On Thu, Mar 24, 2016 at 3:11 PM, Krzysztof Kozlowski wrote: > On Tue, Mar 22, 2016 at 6:06 AM, Ivaylo Dimitrov > wrote: >> Hi, >> >> On 21.03.2016 21:18, Mark Brown wrote: >>> >>> Currently we only attempt to set the voltage during constraints >>> application if an exact voltage is specified. Ex

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-23 Thread Krzysztof Kozlowski
On Tue, Mar 22, 2016 at 6:06 AM, Ivaylo Dimitrov wrote: > Hi, > > On 21.03.2016 21:18, Mark Brown wrote: >> >> Currently we only attempt to set the voltage during constraints >> application if an exact voltage is specified. Extend this so that if >> the currently set voltage for the regualtor is

Re: [PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-21 Thread Ivaylo Dimitrov
Hi, On 21.03.2016 21:18, Mark Brown wrote: Currently we only attempt to set the voltage during constraints application if an exact voltage is specified. Extend this so that if the currently set voltage for the regualtor is outside the bounds set in regulator constraints we will move the vol

[PATCH 2/2] regulator: core: Ensure we are at least in bounds for our constraints

2016-03-21 Thread Mark Brown
Currently we only attempt to set the voltage during constraints application if an exact voltage is specified. Extend this so that if the currently set voltage for the regualtor is outside the bounds set in constraints we will move the voltage to the nearest constraint, raising to the minimum or lo