pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation
authorUwe Kleine-König <uwe@kleine-koenig.org>
Sat, 24 Aug 2019 00:10:38 +0000 (02:10 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 8 Jan 2020 12:43:39 +0000 (13:43 +0100)
commit2101c878f767fc6341ce0057e3b53d6129e76d99
treec26d5ea2989b9d27f49bfab18b6db7b27836cd32
parentff55e7a314143e717f4d96271b541c29111502df
pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation

The calculated values are the same with the modified algorithm. The only
difference is that the calculation is a bit more efficient.

Acked-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel.c