From: Axel Lin Date: Tue, 17 Jul 2012 03:29:03 +0000 (+0800) Subject: regulator: palmas: Fix calcuating selector in palmas_map_voltage_smps X-Git-Tag: v3.6-rc1~157^2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a165df7a915cb212f41c1dec9abc5ac8f8ee6b6;p=pandora-kernel.git regulator: palmas: Fix calcuating selector in palmas_map_voltage_smps The logic of calculating selector in palmas_map_voltage_smps() does not match the logic to list voltage in palmas_list_voltage_smps(). We use below equation to calculate voltage when selector > 0: voltage = (0.49V + (selector * 0.01V)) * RANGE RANGE is either x1 or x2 So we need to take into account with the multiplier set in VSEL register when calculating selector in palmas_map_voltage_smps() Signed-off-by: Axel Lin Acked-by: Graeme Gregory Signed-off-by: Mark Brown --- Reading git-diff-tree failed