Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Hans de Goede
Hi, On 27-04-16 18:30, Mark Brown wrote: On Wed, Apr 27, 2016 at 06:04:53PM +0200, Hans de Goede wrote: On 27-04-16 17:48, Mark Brown wrote: Well, I guess someone can just measure what happens? What happens will likely depend on the pmic input voltage, which can be either 5V from a charge

Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 06:04:53PM +0200, Hans de Goede wrote: > On 27-04-16 17:48, Mark Brown wrote: > >Well, I guess someone can just measure what happens? > What happens will likely depend on the pmic input voltage, > which can be either 5V from a charger / usb or can be approx > 3.8V from a l

Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Hans de Goede
Hi, On 27-04-16 17:48, Mark Brown wrote: On Wed, Apr 27, 2016 at 05:35:31PM +0200, Hans de Goede wrote: On 27-04-16 17:12, Mark Brown wrote: Why not just implement that? Given the formula in the datasheet to calculate the ldo_io regulator voltage 0x1f maps to 3.8V, but according to the da

Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 05:35:31PM +0200, Hans de Goede wrote: > On 27-04-16 17:12, Mark Brown wrote: > >Why not just implement that? > Given the formula in the datasheet to calculate the ldo_io > regulator voltage 0x1f maps to 3.8V, but according to the > datasheet the maximum voltage supported

Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Hans de Goede
Hi, On 27-04-16 17:12, Mark Brown wrote: On Wed, Apr 27, 2016 at 03:59:28PM +0200, Hans de Goede wrote: The maximum supported voltage for ldo_io# is 3.3V, but on cold boot the selector comes up at 0x1f, which maps to 3.8V. Why not just implement that? I guess I was not clear in my commit ms

Re: [PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 03:59:28PM +0200, Hans de Goede wrote: > The maximum supported voltage for ldo_io# is 3.3V, but on cold > boot the selector comes up at 0x1f, which maps to 3.8V. Why not just implement that? We know what it does and it preserves the expected behaviour where we don't touch

[PATCH v2 3/3] regulator: axp20x: Fix axp22x ldo_io registration error on cold boot

2016-04-27 Thread Hans de Goede
The maximum supported voltage for ldo_io# is 3.3V, but on cold boot the selector comes up at 0x1f, which maps to 3.8V. This causes _regulator_get_voltage() to fail with -EINVAL which causes regulator registration to fail when constrains are used: [1.467788] vcc-touchscreen: failed to get the