From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218AbdECAIC (ORCPT ); Tue, 2 May 2017 20:08:02 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:37975 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbdECAH7 (ORCPT ); Tue, 2 May 2017 20:07:59 -0400 From: Chris Packham To: Guenter Roeck CC: "linux-hwmon@vger.kernel.org" , Jean Delvare , Jonathan Corbet , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/3] hwmon: (adt7475) fan stall prevention Thread-Topic: [PATCH 2/3] hwmon: (adt7475) fan stall prevention Thread-Index: AQHSwwdjkGPtXGrXkUi+40FY8jB8cA== Date: Wed, 3 May 2017 00:07:50 +0000 Message-ID: <7cbe65b4a829422998ab4cec41588831@svr-chch-ex1.atlnz.lc> References: <20170502054536.21147-1-chris.packham@alliedtelesis.co.nz> <20170502054536.21147-3-chris.packham@alliedtelesis.co.nz> <20170502180731.GA12773@roeck-us.net> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [2001:df5:b000:22:f53e:e191:d752:ad43] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v43093TA015327 On 03/05/17 06:07, Guenter Roeck wrote: > On Tue, May 02, 2017 at 05:45:35PM +1200, Chris Packham wrote: >> By default adt7475 will stop the fans (pwm duty cycle 0%) when the >> temperature drops past Tmin - hysteresis. Some systems want to keep the >> fans moving even when the temperature drops so add new sysfs attributes >> that configure the enhanced acoustics min 1-3 which allows the fans to >> run at the minimum configure pwm duty cycle. >> >> Signed-off-by: Chris Packham >> --- >> pwmN_min is a horrible name but I really can't think of anything better. >> I'm biased a little because that is essentially the name of the bits in >> the datasheet. I'm open to suggestions. > > pwmX_min is also traditionally the mimimum permitted pwm value, > not a boolean. This would be more appropriate to reflect the PWMmin > register values (0x64 to 0x66). Similar for pwmX_max if you want to > add support for it. For the adt7476 driver these are used as pwmN_auto_point[12]_pwm. > It might make sense to combine pwmX_min==0 with clearing the > respective bit in the REG_ENHANCE_ACOUSTICS[12] register. This way > we would only need one attribute to support both. I could add code such that if pwmN_auto_point1_pwm > 0. The bit in REG_ENHANCE_ACOUSTICS is set but that would be a change in existing behaviour.