lkml.org 
[lkml]   [2014]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] regulator: max77802: set opmode to normal if off is read from hw
On 27.08.2014 21:15, Mark Brown wrote:
> On Wed, Aug 27, 2014 at 08:52:49PM +0200, Tomasz Figa wrote:
>> On 27.08.2014 20:47, Mark Brown wrote:
>
>>> I'm not convinced that's worth it - chances are that if anything changed
>>> the mode it was a previously running Linux which will most likely be
>>> doing the same things when it starts running anyway.
>
>> The previously running Linux would have changed the opmode accidentally,
>> due to hardware design of PMIC chip, which doesn't allow powering off a
>> regulator in other way than setting opmode to OFF.
>
>> If you provide the "active" opmode to that Linux, after a warm reboot it
>> will be able to power on such regulator to correct opmode, without
>> defaulting it incorrectly to NORMAL.
>
> This is in the scenario where the previously running Linux changed the
> mode to something other than normal and where the freshly booted Linux
> can't figure out how to do that when it needs to. I'm not sure how
> plausible that scenario is, or that real systems would handle it
> robustly.
>

I'm not sure I'm getting your point.

If the only thing Linux can do is read back the opmode from PMIC
registers, it doesn't explicitly set it to something other, but rather
reuses what was set by something before it (or, after this patch,
defaults to NORMAL if it's OFF), i.e. the low level firmware or Linux.

However the information about original setting is lost whenever Linux
turns the regulator off and performs a warm reboot, which I believe
would be a quite common scenario.

Best regards,
Tomasz


\
 
 \ /
  Last update: 2014-08-27 21:41    [W:0.082 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site