Re: [PATCH v5 2/2] pwm: Add clock based PWM output driver

From: Uwe Kleine-König
Date: Sat Feb 19 2022 - 05:11:21 EST


Hello,

On Sat, Feb 19, 2022 at 11:46:31AM +0500, Nikita Travkin wrote:
> Uwe Kleine-König писал(а) 14.02.2022 23:43:
> > On Sat, Feb 12, 2022 at 09:23:42PM +0500, Nikita Travkin wrote:
> >> + * Limitations:
> >> + * - Glitches are possible when new pwm state is applied.
> >> + * - Due to the fact that exact behavior depends on the underlying
> >> + * clock driver, various limitations are possible.
> >> + * - Period depends on the clock and, in general, not guaranteed.
> >
> > This sentence is broken.
> >
>
> Here what I mean is that the clock driver might e.g. have a lookup table
> for some rates and will only set one close to the requested ones.
> (Extreme scenario is that only one rate is allowed in the lookup table,
> which is a real possibility for some platforms that I think this driver
> will be used with, the lookup may need to be changed for those clocks)
>
> I will reword this like:
>
> Some clock drivers may only pick the closest available rate
> and not the exact requested one. Because of this, exact period
> is not guaranteed.

That there is no exact match is quite normal also for dedicated PWM
HW blocks. So I think the second item in your list is good enough to
cover the non-existing guaranteed for period and glitches.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature