Skip to content
Commit cd378881 authored by David Rivshin's avatar David Rivshin Committed by Thierry Reding
Browse files

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: 6604c655 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: default avatarDavid Rivshin <drivshin@allworx.com>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
[thierry.reding@gmail.com: minor coding style cleanups]
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent f8caa792
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