summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Rivshin <drivshin@allworx.com>2016-01-30 07:26:51 +0300
committerThierry Reding <thierry.reding@gmail.com>2016-03-23 19:11:45 +0300
commitf8caa792261c0edded20eba2b8fcc899a1b91819 (patch)
tree7920bbf9a010fe99d53ac154f7fc20253127f3f3 /Makefile
parentc5857e3f94ab2719dfac649a146cb5dd6f21fcf3 (diff)
downloadlinux-f8caa792261c0edded20eba2b8fcc899a1b91819.tar.xz
pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations
Fix the calculation of load_value and match_value. Currently they are slightly too low, which produces a noticeably wrong PWM rate with sufficiently short periods (i.e. when 1/period approaches clk_rate/2). Example: clk_rate=32768Hz, period=122070ns, duty_cycle=61035ns (8192Hz/50% PWM) Correct values: load = 0xfffffffc, match = 0xfffffffd Current values: load = 0xfffffffa, match = 0xfffffffc effective PWM: period=183105ns, duty_cycle=91553ns (5461Hz/50% PWM) 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> Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions