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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <vljrtytihjud6v4xnyolrnbopep45ga2kagygoruryqwvpubmt@s76ht4taazpx>
Date: Mon, 20 Jan 2025 15:13:12 +0100
From: Uwe Kleine-König <ukleinek@...nel.org>
To: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Kamel Bouhara <kamel.bouhara@...tlin.com>, Linus Walleij <linus.walleij@...aro.org>, 
	Bartosz Golaszewski <brgl@...ev.pl>, Dmitry Torokhov <dmitry.torokhov@...il.com>, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org, 
	linux-input@...r.kernel.org, linux-pwm@...r.kernel.org, 
	Grégory Clement <gregory.clement@...tlin.com>, Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v3 3/7] pwm: max7360: Add MAX7360 PWM support

Hello Mathieu,

On Fri, Jan 17, 2025 at 04:47:45PM +0100, Mathieu Dubois-Briand wrote:
> On Fri Jan 17, 2025 at 3:40 PM CET, Uwe Kleine-König wrote:
> > sounds great. Note that the detail in rounding that is different for
> > waveforms is that a value that cannot be round down to a valid value
> > (because it's too small) is round up. This is a bit ugly in the drivers
> > but simplifies usage considerably. So you never return -EINVAL because
> > the values don't fit.
> 
> Sorry, I'm not sure I got it right. Does this affect the three members
> of pwm_waveform (period_length_ns, duty_offset_ns, duty_length_ns) ? So
> on this device where the period is fixed and I cannot define an offset,
> does that mean I will silently accept any value for period_length_ns and
> duty_offset_ns ?

Yes. The fromhw callback obviously always fills the respective constants
into .period_length_ns and .duty_offset_ns and the tohw callback
essentially only looks at .duty_length_ns.

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