Hello Roman, On Fri, Apr 30, 2021 at 09:17:49AM +0200, Roman Beranek wrote: > On Fri Apr 30, 2021 at 8:41 AM CEST, Uwe Kleine-König wrote: > > Consider the PWM is running with a period of 4s and the period just > > started. Then you call > > > > pwm_apply_state(mypwm, &(struct pwm_state){ > > .period = 20, > > .enabled = 1, > > ... > > }) > > > > This doesn't result into the waiting code being run, because > > .enabled = 1. Then immidiately after that call: > > > > pwm_apply_state(mypwm, &(struct pwm_state){ > > .period = 20, > > .enabled = 0, > > ... > > }) > > > > which triggers the waiting but only based on a period of 20 ns while the > > 4s period is still active. > > OK, now I see what you mean. To remedy this, the delay shall occur > regardless of state->enabled. > > In my view, this lies beneath the scope of the patch though and would be > better served as a follow-up.
If you agree that dropping both delay and clk_disable completely is the right thing, you address both problems and going forward with your patch isn't sensible. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ | -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210430095101.rjkdukf67h2k4iea%40pengutronix.de.
signature.asc
Description: PGP signature