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: <uw4ans5zzvo65voerbaxvj2erethpuh2jfm2iu7ekqyvgg62nx@lglwyjcpa5aw>
Date: Fri, 7 Feb 2025 09:49:04 +0100
From: Uwe Kleine-König <ukleinek@...nel.org>
To: "Rafael V. Volkmer" <rafael.v.volkmer@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v2 1/1] pwm: tiehrpwm: ensures that state.enabled is
 synchronized in .probe()

Hello Rafael,

On Thu, Feb 06, 2025 at 12:18:52AM -0300, Rafael V. Volkmer wrote:
> If the hardware is already active during probe, it's not asserted
> that the clock is enabled. To address this, added ehrpwm_get_state()
> to verify the enable bit and update the pwm_state struct with the
> correct hardware parameters.
> 
> In ehrpwm_pwm_probe(), the function checks if the enable bit is set
> and calls clk_enable() and pm_runtime_get_sync() if needed.
> 
> Additionally, ehrpwm_get_state() was integrated as .get_state in
> the ehrpwm_pwm_ops struct, incorporating it into the driver's pwm_ops
> for consistent state management.

No in depth review here. One thing I just noticed when skimming your
patch: There are still whitespace style issues (that checkpatch might
not notice), please only use only a single space after =. Also please
split the patch in two: One to introduce .get_state() and the other to
fix clock enable accounting.

I would also consider inlining ehrpwm_read_period(),
ehrpwm_read_duty_cycle() and ehrpwm_read_polarity() into
ehrpwm_get_state() to not have to jump around to understand the register
usage.

For a more detailed review I have to ask for your patience. There are
still some more driver reviews in my list, but I come to your driver
eventually.

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ