All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Axel Lin <axel.lin@gmail.com>,
	linux-kernel@vger.kernel.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo
Date: Wed, 18 Jul 2012 11:06:15 +0100	[thread overview]
Message-ID: <20120718100615.GD22739@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <50066BF2.7050507@slimlogic.co.uk>

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

On Wed, Jul 18, 2012 at 08:55:30AM +0100, Graeme Gregory wrote:
> On 18/07/12 04:30, Axel Lin wrote:
> > This patch fixes below issues when choosing selector:

> > 1. Current code returns negative selector if min_uV < 900000 which is wrong.
> >    For example, it is possible to satisfy the request with selector = 1 if
> >    the requested min_uV is 850000.

> Isnt this defending against bugs in the regulator core? I am normally
> against repeating the same checks at multiple levels in a stack.

This isn't a bug in the core, a negative selector is an error code (and
in general whatever selector is returned by the driver ought to agree
with selectors the driver actually supports).  It's probably at least a
questionable decision in the machine constraints to allow a request for
less than the regulator can deliver to get through though.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-07-18 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18  3:30 [PATCH] regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo Axel Lin
2012-07-18  7:55 ` Graeme Gregory
2012-07-18 10:06   ` Mark Brown [this message]

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=20120718100615.GD22739@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=axel.lin@gmail.com \
    --cc=gg@slimlogic.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.