Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbaLRKmZ (ORCPT ); Thu, 18 Dec 2014 05:42:25 -0500 Received: from bhuna.collabora.co.uk ([93.93.135.160]:41692 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbaLRKmX (ORCPT ); Thu, 18 Dec 2014 05:42:23 -0500 Message-ID: <1418899337.23532.9.camel@collabora.co.uk> Subject: Re: [PATCH 2/9] hwmon: dts: Doc: Add DTS doc to explain how to use PWM FAN as a cooling device From: Sjoerd Simons To: Lukasz Majewski Cc: Eduardo Valentin , Kamil Debski , Jean Delvare , Guenter Roeck , lm-sensors@lm-sensors.org, Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Kukjin Kim , linux-kernel@vger.kernel.org, Sylwester Nawrocki Date: Thu, 18 Dec 2014 11:42:17 +0100 In-Reply-To: <1418897591-18332-3-git-send-email-l.majewski@samsung.com> References: <1418897591-18332-1-git-send-email-l.majewski@samsung.com> <1418897591-18332-3-git-send-email-l.majewski@samsung.com> Organization: Collabora Ltd. Content-Type: multipart/signed; micalg="sha-1"; protocol="application/x-pkcs7-signature"; boundary="=-pTzD8PmNh6ib3IeKY8dO" X-Mailer: Evolution 3.12.9-1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-pTzD8PmNh6ib3IeKY8dO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2014-12-18 at 11:13 +0100, Lukasz Majewski wrote: > Several new properties to allow PWM fan working as a cooling device have = been > combined into this single commit. >=20 > Signed-off-by: Lukasz Majewski > --- > .../devicetree/bindings/hwmon/pwm-fan.txt | 28 ++++++++++++++++= ++++++ > 1 file changed, 28 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Docume= ntation/devicetree/bindings/hwmon/pwm-fan.txt > index 610757c..3877810 100644 > --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt > +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt > @@ -3,10 +3,38 @@ Bindings for a fan connected to the PWM lines > Required properties: > - compatible : "pwm-fan" > - pwms : the PWM that is used to control the PWM fan > +- cooling-pwm-values : PWM duty cycle values relative to > + cooling-max-pwm-value correspondig to > + proper cooling states > +- default-pulse-width : Property specifying default pulse width for = FAN > + at system boot (zero to disable FAN on boot). > + Allowed range is 0 to 255 The 0..255 range seems somewhat random. Would be nicer to either use the approach of pwm-backlight (iotw, have the range go from the first to the last entry of cooling-pwm-values) or simply have be the duty lenght in NS as entries instead of the current indirection. I assumed your cooling-pwm-values are a [0..255] range as well instead of nanoseconds (would be good to make that more clear)? Also having more consistent names would be nice.. To take pwm-backlight as inspiration, cooling-levels and default-cooling-level would make it more clear the second property picks a default setting from the first one. One thing i do wonder, is having an explicit default setting useful? Should it not default to maximum cooling unless otherwise configured by either the thermal framework or sysfs ? > +Thorough description of the following bindings: > + cooling-min-state =3D <0>; > + cooling-max-state =3D <3>; > + #cooling-cells =3D <2>; > + thermal-zone { > + cpu_thermal: cpu-thermal { > + cooling-maps { > + map0 { > + trip =3D <&cpu_alert1>; > + cooling-device =3D <&fan0 0 1>; > + }; > + }; > + }; > + > +for PWM FAN used as cooling device can be found at: > +./Documentation/devicetree/bindings/thermal/thermal.txt > =20 > Example: > pwm-fan { > compatible =3D "pwm-fan"; > status =3D "okay"; > pwms =3D <&pwm 0 10000 0>; > + cooling-min-state =3D <0>; > + cooling-max-state =3D <3>; > + #cooling-cells =3D <2>; > + cooling-pwm-values =3D <0 102 170 255>; > + default-pulse-width =3D <0>; > }; --=-pTzD8PmNh6ib3IeKY8dO Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUA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aHq1uFKoSmNmkgwgYUGCSsGAQQBgjcQBDF4MHYwYjELMAkGA1UE BhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTEh MB8GA1UEAxMYRGlnaUNlcnQgQXNzdXJlZCBJRCBDQS0xAhANn8FCjYb5C/HTfPLVBb1cMIGHBgsq hkiG9w0BCRACCzF4oHYwYjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcG A1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTEhMB8GA1UEAxMYRGlnaUNlcnQgQXNzdXJlZCBJRCBDQS0x AhANn8FCjYb5C/HTfPLVBb1cMA0GCSqGSIb3DQEBAQUABIIBALWC8eH8mguorKzL090wIdAofzjb qH2SwWw3o61cezxyv3SVmTv6MC9/7sL7TZKizcCGUp90NcXCP4hOQGrzmujozLlwHtH7RGVapE74 Qv0uvW5+YIC/LY+eH3RZpA0n7d6S76TQZIHL9/1ndE+4awNIhGawAOrOcx7bXN/UUZPXie6xsHZX rRG8/vKynXkFA+w/ySfpEfAnO8O1u4BENjW9UaMeJHMVfEvJ/y5Q2z9DE9FQC56sx0V5YyCbwnV0 OJJLWwKSNlAPsLqNQlRB+jXgIR+hqOg5qhmffptm49EBXjgdTCSrZAygssA+kSaYKoqgwPV2JsqT gSJ4BQdYYEQAAAAAAAA= --=-pTzD8PmNh6ib3IeKY8dO-- -- 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/