diff options
author | Baruch Siach <baruch@tkos.co.il> | 2021-01-20 18:16:25 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2021-02-15 11:43:30 +0100 |
commit | aa37e27f610fe3e7539c066d9c1f5304390086d6 (patch) | |
tree | 40e5f553d7fb46c1976af9952b053db5044d6f7f /net/sched/em_text.c | |
parent | 4bf2426103d2dd89c1b48bd5eba8cd16903ec40b (diff) | |
download | linux-stable-aa37e27f610fe3e7539c066d9c1f5304390086d6.tar.gz linux-stable-aa37e27f610fe3e7539c066d9c1f5304390086d6.tar.bz2 linux-stable-aa37e27f610fe3e7539c066d9c1f5304390086d6.zip |
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 <u.kleine-koenig@pengutronix.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'net/sched/em_text.c')
0 files changed, 0 insertions, 0 deletions