lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZwajVXRwDLDg2rc7@lizhi-Precision-Tower-5810>
Date: Wed, 9 Oct 2024 11:37:57 -0400
From: Frank Li <Frank.li@....com>
To: Marek Vasut <marex@...x.de>
Cc: u.kleine-koenig@...libre.com, conor+dt@...nel.org,
	devicetree@...r.kernel.org, festevam@...il.com,
	francesco@...cini.it, imx@...ts.linux.dev, jun.li@....com,
	kernel@...gutronix.de, krzk+dt@...nel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-pwm@...r.kernel.org, p.zabel@...gutronix.de,
	pratikmanvar09@...il.com, robh@...nel.org, s.hauer@...gutronix.de,
	shawnguo@...nel.org, xiaoning.wang@....com
Subject: Re: [PATCH v8 1/1] pwm: imx27: workaround of the pwm output bug when
 decrease the duty cycle

On Wed, Oct 09, 2024 at 03:55:35AM +0200, Marek Vasut wrote:
> On 10/8/24 9:41 PM, Frank Li wrote:
>
> [...]
>
> > +	c = clkrate * 1500;
> > +	do_div(c, NSEC_PER_SEC);
> > +
> > +	local_irq_save(flags);
> > +	val = FIELD_GET(MX3_PWMSR_FIFOAV, readl_relaxed(imx->mmio_base + MX3_PWMSR));
> > +
> > +	if (duty_cycles < imx->duty_cycle && (cr & MX3_PWMCR_EN)) {
>
> I think you can use state->enabled instead of (cr & MX3_PWMCR_EN).

state->enabled is new state. Need check old state here. If old state is
disable, needn't this workaround at all.

Frank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ