summaryrefslogtreecommitdiff
path: root/drivers/regulator/rk808-regulator.c
diff options
context:
space:
mode:
authorGaetan Hug <ghug@induct.be>2015-03-11 15:08:12 +0300
committerThierry Reding <thierry.reding@gmail.com>2015-03-11 15:11:16 +0300
commit24ccea1ce6717b91bb1e71b12cfd956f8d32dcf3 (patch)
tree931a34a00fc38bc38ee9367a0b47ceaa3c7dcb0b /drivers/regulator/rk808-regulator.c
parent054d3e1f9a995e13b8be07482fe5c1c42655223d (diff)
downloadlinux-24ccea1ce6717b91bb1e71b12cfd956f8d32dcf3.tar.xz
pwm: mxs: Fix period divider computation
The driver computes which clock divider it sould be using from the requested period. This computation assumes that the link between the register value and the actual divider value is raising 2 to the power of the registry value. div = 1 << regvalue This is true only for the first 5 values out of 8. Next values are 64, 256 and, 1024 - instead of 32, 64, 128. This affects only the users requesting a period > 0.04369s. Replace the computation with a look-up table. Signed-off-by: Gaetan Hug <ghug@induct.be> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/regulator/rk808-regulator.c')
0 files changed, 0 insertions, 0 deletions