summaryrefslogtreecommitdiffstats
path: root/include/clocksource
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2021-01-20 18:16:25 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-02-15 11:43:30 +0100
commitaa37e27f610fe3e7539c066d9c1f5304390086d6 (patch)
tree40e5f553d7fb46c1976af9952b053db5044d6f7f /include/clocksource
parent4bf2426103d2dd89c1b48bd5eba8cd16903ec40b (diff)
downloadlinux-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 'include/clocksource')
0 files changed, 0 insertions, 0 deletions