Re: [PATCH] regulator: arizona-micsupp: Fix choosing selector inarizona_micsupp_map_voltage
From: Mark Brown
Date: Tue Jun 26 2012 - 05:08:22 EST
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:
signature.asc
Description: Digital signature