[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140827183733.GN17528@sirena.org.uk>
Date: Wed, 27 Aug 2014 19:37:33 +0100
From: Mark Brown <broonie@...nel.org>
To: Tomasz Figa <tomasz.figa@...il.com>
Cc: Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
Doug Anderson <dianders@...omium.org>,
Olof Johansson <olof@...om.net>,
Yuvaraj Kumar C D <yuvaraj.cd@...il.com>,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] regulator: max77802: set opmode to normal if off is
read from hw
On Wed, Aug 27, 2014 at 08:32:38PM +0200, Tomasz Figa wrote:
> On 26.08.2014 13:37, Javier Martinez Canillas wrote:
> > + /*
> > + * If the regulator is disabled and the system warm rebooted,
> > + * the hardware reports OFF as the regulator operating mode.
> > + * Default to operating mode NORMAL in that case.
> > + */
> > + if (val == MAX77802_OPMODE_OFF)
> > + max77802->opmode[id] = MAX77802_OPMODE_NORMAL;
> > + else
> > + max77802->opmode[id] = val;
> I might be missing something, but I believe I see a flaw here. If after
> a cold boot opmode is something else than OFF or NORMAL, the kernel
> starts, turns the regulator off and does warm reboot, the setting is
> lost and the regulator is switched to NORMAL mode.
That's essentially the situation the patch is trying to fix - if we boot
and the regulator is off there's no way to figure out what the operating
mode would have been so we have to pick something. If you've got an
idea for something better to do...
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists