summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorDavid Rivshin <drivshin@allworx.com>2016-01-30 07:26:53 +0300
committerThierry Reding <thierry.reding@gmail.com>2016-03-23 19:11:47 +0300
commit7b0883f33809ff0aeca9848193c31629a752bb77 (patch)
tree2c3a38a5419fa19b716d5aad77a48702257dc30a /drivers/platform/x86
parentcd378881426379a62a7fe67f34b8cbe738302022 (diff)
downloadlinux-7b0883f33809ff0aeca9848193c31629a752bb77.tar.xz
pwm: omap-dmtimer: Round load and match values rather than truncate
When converting period and duty_cycle from nanoseconds to fclk cycles, the error introduced by the integer division can be appreciable, especially in the case of slow fclk or short period. Use DIV_ROUND_CLOSEST_ULL() so that the error is kept to +/- 0.5 clock cycles. Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/platform/x86')
0 files changed, 0 insertions, 0 deletions