summaryrefslogtreecommitdiff
path: root/drivers/pwm/Kconfig
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-03-23 17:24:19 +0300
committerThierry Reding <thierry.reding@gmail.com>2020-03-30 19:03:09 +0300
commit485b56f08f3342f353369ee6f9c26053efb2b925 (patch)
treef380328c4159b49761dd8fd50ead4df230d5b0b0 /drivers/pwm/Kconfig
parentce1f9cece057843a03a6b9de361a03eb37dd3fac (diff)
downloadlinux-485b56f08f3342f353369ee6f9c26053efb2b925.tar.xz
pwm: jz4740: Improve algorithm of clock calculation
The previous algorithm hardcoded details about how the TCU clocks work. The new algorithm will use clk_round_rate to find the perfect clock rate for the PWM channel. This code relies on the fact that clk_round_rate() will always round down, which is not a valid assumption given by the clk API, but only happens to be true with the clk drivers used for Ingenic SoCs. Right now, there is no alternative as the clk API does not have a round-down function (and won't have one for a while), but if it ever comes to light, a round-down function should be used instead. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Tested-by: Mathieu Malaterre <malat@debian.org> Tested-by: Artur Rojek <contact@artur-rojek.eu> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/Kconfig')
0 files changed, 0 insertions, 0 deletions