Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Javier Martinez Canillas
On 08/19/2014 02:43 PM, Ulf Hansson wrote: > > Well, currently this seems like the best approach. If we end up having > some new regulator helper function, future wise, we can convert to > such later on. > Great, thanks a lot for your help! > Kind regards > Uffe > Best regards, Javier -- To

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Ulf Hansson
On 14 August 2014 14:39, Javier Martinez Canillas wrote: > The operation conditions register (OCR) stores the voltage > profile of the card, however the list of possible voltages > is restricted by the voltage range supported by the supply > used as VCC/VDD. So in mmc_vddrange_to_ocrmask() a OCR

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Ulf Hansson
On 19 August 2014 13:29, Javier Martinez Canillas wrote: > Hello Ulf, > > On 08/15/2014 04:51 PM, Ulf Hansson wrote: >> >> Just wanted to add some input regarding the errors in the mmc case. >> These are of high importance. In principle if you get, "Failed getting >> OCR mask: -22", likely you

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Javier Martinez Canillas
Hello Ulf, On 08/15/2014 04:51 PM, Ulf Hansson wrote: > > Just wanted to add some input regarding the errors in the mmc case. > These are of high importance. In principle if you get, "Failed getting > OCR mask: -22", likely you will be using a wrong OCR mask while > negotiating the voltage level

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Javier Martinez Canillas
Hello Ulf, On 08/15/2014 04:51 PM, Ulf Hansson wrote: Just wanted to add some input regarding the errors in the mmc case. These are of high importance. In principle if you get, Failed getting OCR mask: -22, likely you will be using a wrong OCR mask while negotiating the voltage level with

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Ulf Hansson
On 19 August 2014 13:29, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Hello Ulf, On 08/15/2014 04:51 PM, Ulf Hansson wrote: Just wanted to add some input regarding the errors in the mmc case. These are of high importance. In principle if you get, Failed getting OCR mask:

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Ulf Hansson
On 14 August 2014 14:39, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: The operation conditions register (OCR) stores the voltage profile of the card, however the list of possible voltages is restricted by the voltage range supported by the supply used as VCC/VDD. So in

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-19 Thread Javier Martinez Canillas
On 08/19/2014 02:43 PM, Ulf Hansson wrote: Well, currently this seems like the best approach. If we end up having some new regulator helper function, future wise, we can convert to such later on. Great, thanks a lot for your help! Kind regards Uffe Best regards, Javier -- To

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-18 Thread Mark Brown
On Sun, Aug 17, 2014 at 10:11:30AM -0700, Tim Kryger wrote: > On Fri, Aug 15, 2014 at 3:29 PM, Mark Brown wrote: > > Nobody has written suitable code, and please bear in mind that even if > > the code is written there will probably be cases where it's too > > expensive for whatever reason so

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-18 Thread Mark Brown
On Sun, Aug 17, 2014 at 10:11:30AM -0700, Tim Kryger wrote: On Fri, Aug 15, 2014 at 3:29 PM, Mark Brown broo...@kernel.org wrote: Nobody has written suitable code, and please bear in mind that even if the code is written there will probably be cases where it's too expensive for whatever

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-17 Thread Tim Kryger
On Fri, Aug 15, 2014 at 3:29 PM, Mark Brown wrote: > On Fri, Aug 15, 2014 at 07:19:41AM -0700, Tim Kryger wrote: > >> That is a little different from my suggestion where the constraints >> check is skipped when the regulator output is fixed. It effectively >> does this now when the regulator

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-17 Thread Tim Kryger
On Fri, Aug 15, 2014 at 3:29 PM, Mark Brown broo...@kernel.org wrote: On Fri, Aug 15, 2014 at 07:19:41AM -0700, Tim Kryger wrote: That is a little different from my suggestion where the constraints check is skipped when the regulator output is fixed. It effectively does this now when the

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-16 Thread Mark Brown
On Fri, Aug 15, 2014 at 04:51:38PM +0200, Ulf Hansson wrote: > Just wanted to add some input regarding the errors in the mmc case. > These are of high importance. In principle if you get, "Failed getting > OCR mask: -22", likely you will be using a wrong OCR mask while > negotiating the voltage

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-16 Thread Mark Brown
On Fri, Aug 15, 2014 at 04:51:38PM +0200, Ulf Hansson wrote: Just wanted to add some input regarding the errors in the mmc case. These are of high importance. In principle if you get, Failed getting OCR mask: -22, likely you will be using a wrong OCR mask while negotiating the voltage level

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Fri, Aug 15, 2014 at 07:19:41AM -0700, Tim Kryger wrote: > That is a little different from my suggestion where the constraints > check is skipped when the regulator output is fixed. It effectively > does this now when the regulator itself provides the fixed voltage. > However, the checks

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Ulf Hansson
On 15 August 2014 11:55, Mark Brown wrote: > On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: > >> But now I wonder why regulator_list_voltage() even list the voltage for >> fixed regulators (desc->fixed_uV) since they don't have the ability to >> vary voltage. The

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Tim Kryger
On Fri, Aug 15, 2014 at 12:48 AM, Javier Martinez Canillas wrote: > Hello Tim, > > On 08/15/2014 07:36 AM, Tim Kryger wrote: >> On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown wrote: >> >>> Right, there's two things going on here. One is that as you describe we >>> shouldn't be putting constraints

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Javier Martinez Canillas
Hello Mark, On 08/15/2014 11:55 AM, Mark Brown wrote: > On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: > >> But now I wonder why regulator_list_voltage() even list the voltage for >> fixed regulators (desc->fixed_uV) since they don't have the ability to > > That's

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: > But now I wonder why regulator_list_voltage() even list the voltage for > fixed regulators (desc->fixed_uV) since they don't have the ability to > vary voltage. The regulator_list_voltage() documentation says: That's

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Thu, Aug 14, 2014 at 10:36:18PM -0700, Tim Kryger wrote: > On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown wrote: > > > Right, there's two things going on here. One is that as you describe we > > shouldn't be putting constraints in .dtsi files if we don't know they're > > OK for a given board.

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Javier Martinez Canillas
Hello Tim, On 08/15/2014 07:36 AM, Tim Kryger wrote: > On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown wrote: > >> Right, there's two things going on here. One is that as you describe we >> shouldn't be putting constraints in .dtsi files if we don't know they're >> OK for a given board. The other

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Javier Martinez Canillas
Hello Tim, On 08/15/2014 07:36 AM, Tim Kryger wrote: On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown broo...@kernel.org wrote: Right, there's two things going on here. One is that as you describe we shouldn't be putting constraints in .dtsi files if we don't know they're OK for a given board.

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Thu, Aug 14, 2014 at 10:36:18PM -0700, Tim Kryger wrote: On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown broo...@kernel.org wrote: Right, there's two things going on here. One is that as you describe we shouldn't be putting constraints in .dtsi files if we don't know they're OK for a

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: But now I wonder why regulator_list_voltage() even list the voltage for fixed regulators (desc-fixed_uV) since they don't have the ability to vary voltage. The regulator_list_voltage() documentation says: That's because

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Javier Martinez Canillas
Hello Mark, On 08/15/2014 11:55 AM, Mark Brown wrote: On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: But now I wonder why regulator_list_voltage() even list the voltage for fixed regulators (desc-fixed_uV) since they don't have the ability to That's because it's

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Tim Kryger
On Fri, Aug 15, 2014 at 12:48 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Hello Tim, On 08/15/2014 07:36 AM, Tim Kryger wrote: On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown broo...@kernel.org wrote: Right, there's two things going on here. One is that as you describe

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Ulf Hansson
On 15 August 2014 11:55, Mark Brown broo...@kernel.org wrote: On Fri, Aug 15, 2014 at 09:48:43AM +0200, Javier Martinez Canillas wrote: But now I wonder why regulator_list_voltage() even list the voltage for fixed regulators (desc-fixed_uV) since they don't have the ability to vary voltage.

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-15 Thread Mark Brown
On Fri, Aug 15, 2014 at 07:19:41AM -0700, Tim Kryger wrote: That is a little different from my suggestion where the constraints check is skipped when the regulator output is fixed. It effectively does this now when the regulator itself provides the fixed voltage. However, the checks aren't

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Tim Kryger
On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown wrote: > Right, there's two things going on here. One is that as you describe we > shouldn't be putting constraints in .dtsi files if we don't know they're > OK for a given board. The other thing is that on this particular board > it turns out that

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Javier Martinez Canillas
Hello Tim, Thanks for your feedback. On 08/14/2014 04:13 PM, Tim Kryger wrote: > > https://lkml.org/lkml/2014/8/12/377 > > Perhaps I misunderstood the discussion in that thread but couldn't > this failure also be addressed by adding proper constraints for each > FET in individual DTS files to

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Mark Brown
On Thu, Aug 14, 2014 at 07:13:00AM -0700, Tim Kryger wrote: > On Thu, Aug 14, 2014 at 5:39 AM, Javier Martinez Canillas > > Without this patch, the following warning is reported when > > a FET is used as a vmmc-supply: > > dwmmc_exynos 1222.mmc: Failed getting OCR mask: -22 > >

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Tim Kryger
On Thu, Aug 14, 2014 at 5:39 AM, Javier Martinez Canillas wrote: > The operation conditions register (OCR) stores the voltage > profile of the card, however the list of possible voltages > is restricted by the voltage range supported by the supply > used as VCC/VDD. So in

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Tim Kryger
On Thu, Aug 14, 2014 at 5:39 AM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: The operation conditions register (OCR) stores the voltage profile of the card, however the list of possible voltages is restricted by the voltage range supported by the supply used as VCC/VDD. So

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Mark Brown
On Thu, Aug 14, 2014 at 07:13:00AM -0700, Tim Kryger wrote: On Thu, Aug 14, 2014 at 5:39 AM, Javier Martinez Canillas Without this patch, the following warning is reported when a FET is used as a vmmc-supply: dwmmc_exynos 1222.mmc: Failed getting OCR mask: -22 Signed-off-by: Javier

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Javier Martinez Canillas
Hello Tim, Thanks for your feedback. On 08/14/2014 04:13 PM, Tim Kryger wrote: https://lkml.org/lkml/2014/8/12/377 Perhaps I misunderstood the discussion in that thread but couldn't this failure also be addressed by adding proper constraints for each FET in individual DTS files to

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-14 Thread Tim Kryger
On Thu, Aug 14, 2014 at 8:19 AM, Mark Brown broo...@kernel.org wrote: Right, there's two things going on here. One is that as you describe we shouldn't be putting constraints in .dtsi files if we don't know they're OK for a given board. The other thing is that on this particular board it