From: Axel Lin Date: Tue, 26 Jun 2012 10:37:58 +0000 (+0800) Subject: regulator: arizona-micsupp: Fix choosing selector in arizona_micsupp_map_voltage X-Git-Tag: v3.6-rc1~157^2^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f217d36dce7e3e2789cfbd91ae53a36a98df837;p=pandora-kernel.git regulator: arizona-micsupp: Fix choosing selector in arizona_micsupp_map_voltage If min_uV is in the range of: 3250001~3269999, current code uses the equation: selector = DIV_ROUND_UP(min_uV - 1700000, 50000); Then selector will be 32. Then arizona_micsupp_list_voltage returns -EINVAL for this case which is wrong. This patch fixes this issue: If min_uV > 3200000, selector should be ARIZONA_MICSUPP_MAX_SELECTOR. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed