diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-01-18 18:48:16 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-02-17 17:59:51 +0300 |
commit | 486dd4e846814016443abfcbfee0b8b3f3b35330 (patch) | |
tree | 8be347dc66dc90e83b010d1738573a8fd579022c /tools/perf/scripts/python/task-analyzer.py | |
parent | 2781f8e9203685208c9f3717593601d4b4674372 (diff) | |
download | linux-486dd4e846814016443abfcbfee0b8b3f3b35330.tar.xz |
pwm: ab8500: Fix calculation of duty and period
After a check of the manual it becomes obvious that the calculations in
.apply() are totally bogus:
FreqPWMOutx was always written as zero, so the period was fixed at
3413333.33 ns. However state->period wasn't checked at all.
The lower 10 bits of duty_cycle were just used as DutyPWMOutx. So if
a duty cycle of 512 ns (or 1536 ns) was requested, it actually
programmed 1710000 ns. Other values were wrong by the same factor.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions