Skip to content
Commit 5969a10c authored by David Brown's avatar David Brown Committed by Dan Kalowsky
Browse files

drivers: pwm: rpi_pico: Convert clk calculations to fixed-point



Remove the use of floating point to calculate in
`pwm_rpi_get_cycles_per_sec` to fixed point calculations that result in the
same value.  There is still a division here, which is somewhat slow still,
but the end result about twice fast for the whole path through the led pwm
code.

Even better would be to cache these values, since there is no interface in
this driver to change the configuration past init time.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent c1670f94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment