diff options
author | David Rivshin <drivshin@allworx.com> | 2016-01-30 05:26:52 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-03-23 17:11:46 +0100 |
commit | cd378881426379a62a7fe67f34b8cbe738302022 (patch) | |
tree | a8753c450bfb1c1124ee7f32b6a74d17a58b9529 /arch | |
parent | pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations (diff) | |
download | linux-cd378881426379a62a7fe67f34b8cbe738302022.tar.xz linux-cd378881426379a62a7fe67f34b8cbe738302022.zip |
pwm: omap-dmtimer: Add sanity checking for load and match values
Add sanity checking to ensure that we do not program load or match values
that are out of range if a user requests period or duty_cycle values which
are not achievable. The match value cannot be less than the load value (but
can be equal), and neither can be 0xffffffff. This means that there must be
at least one fclk cycle between load and match, and another between match
and overflow.
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>
[thierry.reding@gmail.com: minor coding style cleanups]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions