]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: mediatek: Improve precision in rate calculation
authorSean Wang <sean.wang@mediatek.com>
Fri, 2 Mar 2018 08:49:14 +0000 (16:49 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 27 Mar 2018 22:32:25 +0000 (00:32 +0200)
commitd670481f6442e4d1d39492f3e076876e785b54be
treebf566c148ad879acf186107da631130d6ae8980d
parent34ae8c4008cd804ec57aed8be5879db78f79d57f
pwm: mediatek: Improve precision in rate calculation

Add a way that turning resolution from in nanosecond into in picosecond
to improve noticeably almost 4.5% precision.

It's necessary to hold the new resolution with type u64 and thus related
operations on u64 are applied instead in those rate calculations.

And the patch has a dependency on [1].

[1] http://lists.infradead.org/pipermail/linux-mediatek/2018-March/012225.html

Cc: stable@vger.kernel.org
Fixes: c4345e8541c6 ("pwm: Add MediaTek PWM support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mediatek.c