diff options
author | 2021-04-26 17:03:50 +0200 | |
---|---|---|
committer | 2021-05-25 18:29:40 +0200 | |
commit | 937efa29e70f7f8424b74631375dcb35d82a4614 (patch) | |
tree | 518cff12f16c69053a475ec7e74a04615b020852 /drivers/pwm/pwm-spear.c | |
parent | pwm: Simplify all drivers with explicit of_pwm_n_cells = 3 (diff) | |
download | wireguard-linux-937efa29e70f7f8424b74631375dcb35d82a4614.tar.xz wireguard-linux-937efa29e70f7f8424b74631375dcb35d82a4614.zip |
pwm: visconti: Fix and simplify period calculation
With the original code a request for period = 65536000 ns and period =
32768000 ns yields the same register settings (which results in 32768000
ns) because the value for pwmc0 was miscalculated.
Also simplify using that fls(0) is 0.
Fixes: 721b595744f1 ("pwm: visconti: Add Toshiba Visconti SoC PWM support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions