Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755665AbbDJRdY (ORCPT ); Fri, 10 Apr 2015 13:33:24 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:44944 "EHLO mail.smart-cactus.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070AbbDJRdW (ORCPT ); Fri, 10 Apr 2015 13:33:22 -0400 X-Greylist: delayed 444 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Apr 2015 13:33:21 EDT From: Ben Gamari To: Thierry Reding , Sjoerd Simons Cc: Guenter Roeck , 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 In-Reply-To: <20150410135844.GA20147@ulmo.nvidia.com> References: <20150408104415.07e1c821@amdc2363> <20150408153214.GA15942@roeck-us.net> <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> User-Agent: Notmuch/0.19+93~g5c0ef3d (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 10 Apr 2015 13:25:52 -0400 Message-ID: <87h9snvqsf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2048 Lines: 53 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thierry Reding writes: > On Fri, Apr 10, 2015 at 03:30:01PM +0200, Sjoerd Simons wrote: >>=20 >> Yes/no/maybe :). Imho this is something to clarify in the pwm API >> documentation. As currently all it says is:=20 >> "pwm_disable - stop a PWM output toggling",=20 >>=20 >> Which is what the exynos driver does.=20 >>=20 >> 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. Cheers, =2D Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVKAehAAoJEHPt6ejPuu8BJNQH/jeNzpQjLNqqhX/I94cQ5O0H wmteEl4B6GGvbWjxQrrIeC2ehezj8lle3ZfeABkpG/W3mLkxig1sN1w8Nbl52iwR BUD0/daUXUctAh+505B530Na9HlVdqRmsNCTbDivQPkKJ4nTM9Hpn18iSB+sFXEh CDLlYWOrm7hf60kCPo7mtT6glfG5Nfl9edp3gqs+/VHG7tXX6t4GLjZsldB5ZWGY Hxb6XpjoukNt3NHU6dUPIRDEqEzGRbEh8cyj90b+qocAntcJ2s0qPHluJU2QYxiK EdocDkhd6xzi++CtN7SBO676q3dIdWzOHXyXzluBbJVGKk3H+aHucMbPlLg1/ts= =bVp/ -----END PGP SIGNATURE----- --=-=-=-- -- 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/