diff options
| author | David Rivshin <[email protected]> | 2016-01-30 04:26:51 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2016-03-23 16:11:45 +0000 |
| commit | f8caa792261c0edded20eba2b8fcc899a1b91819 (patch) | |
| tree | 7920bbf9a010fe99d53ac154f7fc20253127f3f3 /net/switchdev/switchdev.c | |
| parent | pwm: brcmstb: Fix check of devm_ioremap_resource() return code (diff) | |
| download | kernel-f8caa792261c0edded20eba2b8fcc899a1b91819.tar.gz kernel-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 <[email protected]>
Acked-by: Neil Armstrong <[email protected]>
Tested-by: Adam Ford <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
