Re: [PATCH 10/14] pwm: meson: simplify the calculation of the pre-divider and count

2019-05-27 Thread Neil Armstrong
On 26/05/2019 21:41, Uwe Kleine-König wrote: > On Sat, May 25, 2019 at 08:11:29PM +0200, Martin Blumenstingl wrote: >> Replace the loop to calculate the pre-divider and count with two >> separate div64_u64() calculations. This makes the code easier to read >> and improves the precision. >> >> Two e

Re: [PATCH 10/14] pwm: meson: simplify the calculation of the pre-divider and count

2019-05-26 Thread Uwe Kleine-König
On Sat, May 25, 2019 at 08:11:29PM +0200, Martin Blumenstingl wrote: > Replace the loop to calculate the pre-divider and count with two > separate div64_u64() calculations. This makes the code easier to read > and improves the precision. > > Two example cases: > 1) 32.768kHz LPO clock for the SDIO

[PATCH 10/14] pwm: meson: simplify the calculation of the pre-divider and count

2019-05-25 Thread Martin Blumenstingl
Replace the loop to calculate the pre-divider and count with two separate div64_u64() calculations. This makes the code easier to read and improves the precision. Two example cases: 1) 32.768kHz LPO clock for the SDIO wifi chip on Khadas VIM clock input: 500MHz (FCLK_DIV4) period: 30518ns