From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F702C433EF for ; Tue, 17 May 2022 14:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344593AbiEQOyF (ORCPT ); Tue, 17 May 2022 10:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349479AbiEQOx5 (ORCPT ); Tue, 17 May 2022 10:53:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 282BA48313 for ; Tue, 17 May 2022 07:53:52 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqyZt-0003hT-Iv; Tue, 17 May 2022 16:53:37 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nqyZs-002tOA-IM; Tue, 17 May 2022 16:53:35 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nqyZq-00AK4E-AN; Tue, 17 May 2022 16:53:34 +0200 Date: Tue, 17 May 2022 16:53:31 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Alexander Stein Cc: Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Jonathan Corbet , Thierry Reding , Lee Jones , linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, Markus Niebel Subject: Re: [PATCH v3 6/6] hwmon: pwm-fan: Add hwmon_pwm_enable attribute Message-ID: <20220517145331.7ffab4pyjwrh5lkg@pengutronix.de> References: <20220517142620.1523143-1-alexander.stein@ew.tq-group.com> <20220517142620.1523143-7-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lzgyb2mlekugipiz" Content-Disposition: inline In-Reply-To: <20220517142620.1523143-7-alexander.stein@ew.tq-group.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-hwmon@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org --lzgyb2mlekugipiz Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Tue, May 17, 2022 at 04:26:20PM +0200, Alexander Stein wrote: > This adds the enable attribute which is used to differentiate if PWM duty > means to switch off regulator and PWM or to keep them enabled but > at inactive PWM output level. >=20 > Signed-off-by: Alexander Stein > --- > Documentation/hwmon/pwm-fan.rst | 10 ++++ > drivers/hwmon/pwm-fan.c | 95 +++++++++++++++++++++++++++++---- > 2 files changed, 95 insertions(+), 10 deletions(-) >=20 > diff --git a/Documentation/hwmon/pwm-fan.rst b/Documentation/hwmon/pwm-fa= n.rst > index 82fe96742fee..0083480068d1 100644 > --- a/Documentation/hwmon/pwm-fan.rst > +++ b/Documentation/hwmon/pwm-fan.rst > @@ -18,3 +18,13 @@ the hwmon's sysfs interface. > =20 > The fan rotation speed returned via the optional 'fan1_input' is extrapo= lated > from the sampled interrupts from the tachometer signal within 1 second. > + > +The driver provides the following sensor accesses in sysfs: > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > +fan1_input ro fan tachometer speed in RPM > +pwm1_enable rw keep enable mode, defines behaviour when pwm1=3D0 > + 0=3Dswitch off regulator and disable PWM > + 1=3Dkeep regulator enabled and set PWM to inactive level Is the pwm1_enable supposed to be set to 0 if that only does the right thing if the PWM emits low after pwm_disable()? The question I raised in v2 about "what is the meaning of disable?" hasn't evolved, has it? I still think it's unfortunate, that "pwm1_enable" has an effect on the regulator. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --lzgyb2mlekugipiz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmKDtugACgkQwfwUeK3K 7AmkAAf+Jg/NaHTE6D0cI+VGke8kConLhaiJOsAMqb3AXb4VV0yf/CA2gfogVhP9 d1RXpe/g5iy70RWHoDnmLmIB7dHZgek/KglAiJBBYK+6CvNFC6NhvL3roX+itqg/ Nq0LLZwyJsbpcHVyMnfVq1xckPDwv1NLGsffPQWRJO8ume2VaHkCvcZQ/ujr7ODA Uqw6s4N3D73vGIQm7WICurWuV+ITu9I7uLtCFK22REET614NEkFxKZgG2n01ogbF q7QdWe4Y1l+IjDtxf5Jf21pWM3VXsyzk+LNU40h+gzOjMxkwmQGJXmP/tsMH0Rbi aiT7lAub/OJwffO8MFX32QC3mXWx/A== =MXzg -----END PGP SIGNATURE----- --lzgyb2mlekugipiz--