From: Axel Lin Date: Tue, 30 Jul 2013 14:47:44 +0000 (+0800) Subject: regulator: pfuze100: Simplify pfuze100_set_ramp_delay implementation X-Git-Tag: v3.12-rc1~191^2~4^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e56566699ca64ec44dd134ec5310a3585ffacfec;p=pandora-kernel.git regulator: pfuze100: Simplify pfuze100_set_ramp_delay implementation Simplify the equation to calculate ramp_delay. Below equations are equivalent: ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 50000 / (4 * ramp_delay); ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 12500 / ramp_delay; So we don't need to read BIT6 of rdev->desc->vsel_reg for applying different equations. Also use rdev->desc->vsel_reg instead of run-time calculate register address. Signed-off-by: Axel Lin Reviewed-by: Robin Gong Signed-off-by: Mark Brown --- Reading git-diff-tree failed