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: <20150410175801.GA31499@roeck-us.net>
Date:	Fri, 10 Apr 2015 10:58:01 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Ben Gamari <ben@...rt-cactus.org>
Cc:	Thierry Reding <thierry.reding@...il.com>,
	Sjoerd Simons <sjoerd.simons@...labora.co.uk>,
	Anand Moon <linux.amoon@...il.com>,
	Lukasz Majewski <l.majewski@...sung.com>,
	Eduardo Valentin <edubezval@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Kukjin Kim <kgene@...nel.org>, devicetree@...r.kernel.org,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>, linux-pwm@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Markus Reichl <m.reichl@...etechno.de>
Subject: Re: [PATCH 6/6] hwmon: pwm-fan: Update the duty cycle inorder to
 control the pwm-fan

On Fri, Apr 10, 2015 at 01:25:52PM -0400, Ben Gamari wrote:
> Thierry Reding <thierry.reding@...il.com> writes:
> 
> > On Fri, Apr 10, 2015 at 03:30:01PM +0200, Sjoerd Simons wrote:
> >> 
> >> Yes/no/maybe :). Imho this is something to clarify in the pwm API
> >> documentation. As currently all it says is: 
> >>   "pwm_disable - stop a PWM output toggling", 
> >> 
> >> Which is what the exynos driver does. 
> >> 
> >> Thierry, could you clearify what the intention is here? I'm happy to
> >> prepare a pwm driver patch if needed to solve this?
> >
> > I think the safest thing to do is for users to do both. You call
> > pwm_config() with a zero duty cycle to make it clear what the status is
> > that you want. Then you call pwm_disable() to state that you don't need
> > the output signal anymore, so that any clocks needed by the PWM can be
> > stopped. Doing so gives the driver the most information and should make
> > the user more resilient against any possible quirks in drivers.
> >
> It would be great if the documentation were more clear on this matter
> regardless. This is something I can imagine having to spend substantial
> amounts of time Googling whereas a simple note in the documentation would
> have removed all ambiguity.
> 
Especially since, in this case, the output signal _is_ still needed.
It appears that pwm_disable() is only expected to stop the clock, not
the signal itself.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ