[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <qucbpwau55tuaf5m5fqpsbub2bbtxcye4djxwrwkabssd2vc4j@weuiawrzbbnn>
Date: Mon, 26 Feb 2024 09:44:16 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Leif Middelschulte <leif.middelschulte@...il.com>
Cc: Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>, Leif Middelschulte <Leif.Middelschulte@...martin.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v4 1/2] pwm: imx27: fix race condition .apply,.get_state
Hello,
On Sat, Feb 24, 2024 at 12:29:00PM +0100, Leif Middelschulte wrote:
> From: Leif Middelschulte <Leif.Middelschulte@...martin.com>
>
> With CONFIG_PWM_DEBUG=y after writing a value to the PWMSAR
> register in .apply(), the register is read in .get_state().
> Unless a period completed in the meantime, this read yields the
> previously used duty cycle configuration. As the PWM_DEBUG code
> applies the read out configuration for testing purposes this
> effectively undoes the intended effect by rewriting the previous
> hardware state.
>
> Note that this change merely implements a sensible heuristic.
> The i.MX has a 4 slot FIFO to configure the duty cycle. This FIFO
> cannot be read back in its entirety. The "write x then read back
> x from hw" semantics are therefore not easily applicable.
> With this change, the .get_state() function tries to wait for some
> stabilization in the FIFO (empty state). In this state it keeps
> applying the last value written to the sample register.
>
> Signed-off-by: Leif Middelschulte <Leif.Middelschulte@...martin.com>
Another few things I noticed only after replying to this patch and
trying to apply #2:
- Please make sure you have a S-o-b line for the sender (i.e. you with
your gmail identity).
- My reply to your klsmartin.com address couldn't be delivered, The MS
mailserver told: "leif.middelschulte wasn't found at klsmartin.com."
- Please start a new thread if you send a v5, as applying patches from
a thread containing many patches is a bit less trivial.
- Consider using git format-patch's --base parameter to document your
patch base.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists