linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] regulator: arizona-micsupp: Fix choosing selector in arizona_micsupp_map_voltage
Date: Tue, 26 Jun 2012 10:08:25 +0100	[thread overview]
Message-ID: <20120626090825.GI30406@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1340697707.12992.1.camel@phoenix>

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

On Tue, Jun 26, 2012 at 04:01:47PM +0800, Axel Lin wrote:

> +	if (min_uV > 3300000)
> +		return -EINVAL;
> +

This is OK but I think we want to factor this out into the caller as
we're implementing this limits check in a lot of places.

> -	if (min_uV >= 3300000)
> +	if (min_uV > 3200000)
>  		selector = ARIZONA_MICSUPP_MAX_SELECTOR;
>  	else
>  		selector = DIV_ROUND_UP(min_uV - 1700000, 50000);

This doesn't change anything; with version of the if statement will give
3.3V for a voltage between 3.2V and 3.3V as there's no gaps in the
selector space so if we're over 3.2V we'll round up to 3.3V.

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

  reply	other threads:[~2012-06-26  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  8:01 [PATCH] regulator: arizona-micsupp: Fix choosing selector in arizona_micsupp_map_voltage Axel Lin
2012-06-26  9:08 ` Mark Brown [this message]
2012-06-26  9:27   ` Axel Lin
2012-06-26  9:52     ` Mark Brown
2012-06-26 10:32       ` Axel Lin
  -- strict thread matches above, loose matches on Subject: below --
2012-06-26 10:37 Axel Lin
2012-06-26 10:48 ` Mark Brown

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=20120626090825.GI30406@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=axel.lin@gmail.com \
    --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 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).