Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756552AbbDJR6j (ORCPT ); Fri, 10 Apr 2015 13:58:39 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:36801 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756032AbbDJR6h (ORCPT ); Fri, 10 Apr 2015 13:58:37 -0400 Date: Fri, 10 Apr 2015 10:58:01 -0700 From: Guenter Roeck To: Ben Gamari Cc: Thierry Reding , Sjoerd Simons , Anand Moon , Lukasz Majewski , Eduardo Valentin , Russell King , Kukjin Kim , devicetree@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Reichl Subject: Re: [PATCH 6/6] hwmon: pwm-fan: Update the duty cycle inorder to control the pwm-fan Message-ID: <20150410175801.GA31499@roeck-us.net> References: <20150408165351.GA22846@roeck-us.net> <1428667201.22057.20.camel@collabora.co.uk> <5527CB78.4040002@roeck-us.net> <1428672601.22057.25.camel@collabora.co.uk> <20150410135844.GA20147@ulmo.nvidia.com> <87h9snvqsf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h9snvqsf.fsf@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020206.55280F4D.0116,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 12 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 36 On Fri, Apr 10, 2015 at 01:25:52PM -0400, Ben Gamari wrote: > Thierry Reding 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/