Re: [RFC PATCH v3 2/2] pwm: imx: Configure output to GPIO in disabled state

From: Uwe Kleine-König
Date: Thu Jan 24 2019 - 05:44:57 EST


On Thu, Jan 24, 2019 at 11:12:12AM +0100, Michal VokÃÄ wrote:
> On 24.1.2019 10:22, Uwe Kleine-KÃnig wrote:
> > I think it might be beneficial to allow (or require) that disable acts
> > immediately. But this is not how it used to be and in my discussion with
> > Thierry (IIRC) he required to complete the currently running period.
>
> I am confused here. IFAIK it always used to be that:
>
> pwm_apply_state(pwm, { .enabled = 0 });
>
> immediately stops the PWM with:
>
> writel(0, imx->mmio_base + MX3_PWMCR);
>
> regardless of the period (for pwm-imx).

Then is is a bug since forever (well, or a fact that resulted from the
intended semantic not being documented and the driver author not caring
or knowing better).

Best regards
Uwe

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