diff options
author | Baruch Siach <[email protected]> | 2021-01-20 18:16:25 +0200 |
---|---|---|
committer | Bartosz Golaszewski <[email protected]> | 2021-02-15 11:43:30 +0100 |
commit | aa37e27f610fe3e7539c066d9c1f5304390086d6 (patch) | |
tree | 40e5f553d7fb46c1976af9952b053db5044d6f7f /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 4bf2426103d2dd89c1b48bd5eba8cd16903ec40b (diff) |
gpio: mvebu: improve pwm period calculation accuracy
Change 'off' register value calculation from
$off = (period - duty_cycle) * clkrate / NSEC_PER_SEC
to
$off = (period * clkrate / NSEC_PER_SEC) - $on
That is, divide the full period value to reduce rounding error.
Reported-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Baruch Siach <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions