Skip to content
Commit 937efa29 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding
Browse files

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: 721b5957 ("pwm: visconti: Add Toshiba Visconti SoC PWM support")
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: default avatarNobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent e9fdf122
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment