diff options
author | David Rivshin <drivshin@allworx.com> | 2016-01-30 05:26:51 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2016-03-23 17:11:45 +0100 |
commit | f8caa792261c0edded20eba2b8fcc899a1b91819 (patch) | |
tree | 7920bbf9a010fe99d53ac154f7fc20253127f3f3 /crypto/echainiv.c | |
parent | pwm: brcmstb: Fix check of devm_ioremap_resource() return code (diff) | |
download | linux-f8caa792261c0edded20eba2b8fcc899a1b91819.tar.xz linux-f8caa792261c0edded20eba2b8fcc899a1b91819.zip |
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 'crypto/echainiv.c')
0 files changed, 0 insertions, 0 deletions