summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-03-23 15:24:19 +0100
committerThierry Reding <thierry.reding@gmail.com>2020-03-30 18:03:09 +0200
commit485b56f08f3342f353369ee6f9c26053efb2b925 (patch)
treef380328c4159b49761dd8fd50ead4df230d5b0b0 /drivers/block
parentce1f9cece057843a03a6b9de361a03eb37dd3fac (diff)
downloadlinux-stable-485b56f08f3342f353369ee6f9c26053efb2b925.tar.gz
linux-stable-485b56f08f3342f353369ee6f9c26053efb2b925.tar.bz2
linux-stable-485b56f08f3342f353369ee6f9c26053efb2b925.zip
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/block')
0 files changed, 0 insertions, 0 deletions