Re: [PATCH v5 08/16] pwm: crc: Fix off-by-one error in the clock-divider calculations

2020-07-30 Thread Andy Shevchenko
On Fri, Jul 17, 2020 at 03:37:45PM +0200, Hans de Goede wrote: > The CRC PWM controller has a clock-divider which divides the clock with > a value between 1-128. But as can seen from the PWM_DIV_CLK_xxx > defines, this range maps to a register value of 0-127. > > So after calculating the

[PATCH v5 08/16] pwm: crc: Fix off-by-one error in the clock-divider calculations

2020-07-17 Thread Hans de Goede
The CRC PWM controller has a clock-divider which divides the clock with a value between 1-128. But as can seen from the PWM_DIV_CLK_xxx defines, this range maps to a register value of 0-127. So after calculating the clock-divider we must subtract 1 to get the register value, unless the requested