Skip to content
Commit e5656669 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

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: default avatarAxel Lin <axel.lin@ingics.com>
Reviewed-by: default avatarRobin Gong <b38343@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent d9493234
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment