linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] regulator: max8925: fix enabled/disabled judgement mistake
Date: Thu, 22 Dec 2011 14:38:03 +0000	[thread overview]
Message-ID: <20111222143803.GB4546@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAN1soZwBX3x5fiLrLwcC_xTSPMuXw4=u5Rj_CF_R_V3attNzYA@mail.gmail.com>

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.

  reply	other threads:[~2011-12-22 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22  8:51 [PATCH] regulator: max8925: fix enabled/disabled judgement mistake Haojian Zhuang
2011-12-22 10:53 ` Mark Brown
2011-12-22 13:31   ` Haojian Zhuang
2011-12-22 13:44     ` Mark Brown
2011-12-22 14:22       ` Haojian Zhuang
2011-12-22 14:38         ` Mark Brown [this message]
2011-12-23 14:42           ` Haojian Zhuang
  -- strict thread matches above, loose matches on Subject: below --
2012-01-04  7:12 Haojian Zhuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111222143803.GB4546@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).