From: Axel Lin Date: Thu, 7 Jun 2012 08:38:09 +0000 (+0800) Subject: regulator: rc5t583: Simplify rc5t583_set_voltage_time_sel implementation X-Git-Tag: v3.6-rc1~157^2^2~126 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1acb645ebfe3a008e3c3350918d7d29974b1eaec;p=pandora-kernel.git regulator: rc5t583: Simplify rc5t583_set_voltage_time_sel implementation For linear mappings, we can use below equation to get the voltage difference between new_selector and old_selector: abs(new_selector - old_selector) * rdev->desc->uV_step Signed-off-by: Axel Lin Acked-by: Laxman Dewangan Signed-off-by: Mark Brown --- Reading git-diff-tree failed