[PATCH] regulator: max8925: fix enabled/disabled judgement mistake

Haojian Zhuang haojian.zhuang at gmail.com
Fri Dec 23 09:42:35 EST 2011


On Thu, Dec 22, 2011 at 10:38 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Thu, Dec 22, 2011 at 10:22:17PM +0800, Haojian Zhuang wrote:
>
>> While we enable/disable the LDO in software, we'll force LDO into I2C mode
>> and enable/disable the control bit. So there's no risk in the
>> enable/disable function.
>
> Oh, dear.  That code really is obscure - it's got a shift called
> enable_bit but actually it's mostly working with bitfields not just a
> single bit.  Reading the enable() and disable() functions it looks like
> they're setting a single bit but that's not the case.
>
> Please send a patch fixing this.
>
>> There's only potential issue of checking whether LDO is enabled. If
>> sequence matches
>> the power sequence (not I2C mode), LDO will be enabled even the
>> control bit is OFF.
>> So this patch is necessary.
>
> I'm not saying the patch isn't required, I'm saying it's very hard to
> work out what the patch is supposed to do and why it's only an issue in
> the is_enabled() function.
>
> Please resend with an improved changelog.

Sure. We'll format a new version.



More information about the linux-arm-kernel mailing list