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]
Date:   Mon, 27 Jul 2020 22:00:44 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     "Tanwar, Rahul" <rahul.tanwar@...ux.intel.com>
Cc:     linux-pwm@...r.kernel.org, thierry.reding@...il.com,
        p.zabel@...gutronix.de, robh+dt@...nel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        andriy.shevchenko@...el.com, songjun.Wu@...el.com,
        cheol.yong.kim@...el.com, qi-ming.wu@...el.com,
        rahul.tanwar.linux@...il.com
Subject: Re: [PATCH v5 2/2] Add PWM fan controller driver for LGM SoC

Hello,

On Mon, Jul 27, 2020 at 03:30:16PM +0800, Tanwar, Rahul wrote:
> On 27/7/2020 3:01 pm, Uwe Kleine-König wrote:
> > In v4 you had:
> >
> > 	if (state->polarity != PWM_POLARITY_NORMAL ||
> > 	    state->period < pc->period)
> > 		return -EINVAL;
> >
> > That's the right thing to do (even though I was unsettled at one point
> > and wrote it was wrong). The check in v5 with state->period !=
> > pc->period is wrong.
> 
> Does that mean we should allow state->period >= pc->period cases?

Yes, the driver is supposed to implement the longest period not longer
than the requested one. This implies everything >= pc->period is fine.

> If the state->period is greater than HW supported pc->period and
> if we allow it then the duty cycle will again be evaluated to be
> incorrect/higher than requested duty cycle. Am i missing something
> else? Thanks.

Yes, similar as with period you're supposed to implement the longest
duty cycle your hardware supports and that is not longer than the
requested duty cycle.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ