All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Armin Wolf <W_Armin@gmx.de>
Cc: linux@roeck-us.net, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v2 6/6] hwmon: (dell-smm-hwmon) Update docs
Date: Fri, 28 May 2021 23:10:37 +0200	[thread overview]
Message-ID: <20210528211037.2tnblovgb3rkcwnq@pali> (raw)
In-Reply-To: <90260e4f-7e3f-20af-7706-add965ae9192@gmx.de>

On Friday 28 May 2021 22:37:06 Armin Wolf wrote:
> Am 28.05.21 um 19:53 schrieb Pali Rohár:
> > On Friday 28 May 2021 19:37:16 W_Armin@gmx.de wrote:
> > > From: Armin Wolf <W_Armin@gmx.de>
> > > 
> > > pwm1_enable is now readable too.
> > Hello! pwm1_enable cannot be readable. It is write-only node. See also:
> > https://lore.kernel.org/linux-hwmon/201605221717.26604@pali/
> > 
> Hello,
> 
> in Documentation/hwmon/sysfs-interface, pwmX_enable is marked as RW, and the document also states that
> "Read/write values may be read-only for some chips, depending on the hardware implementation", so i
> thought that pwm1_enable being WO is a violation of that rule.

I know that hwmon sysfs are rw but if driver cannot provide correct read
value then it is better to do not report it.

> Also i belive the i8kutils are not calling SMM anymore, so can we just leave a note saying something like
> "this value is cached and is not correct when using certain userspace tools which disable/enable BIOS fan control"?

Well, maybe state changed in time (it is 5 years since that email) but
there are still more older versions of i8k userspace tools and some of
them used to issue SMM calls. Personally, I have used them (prior
introducing kernel support) and I can expect that other people who wrote
other scripts may have them in their inittab (or converted to systemd
equivalent). So it is better to not expect that something is not used.

Whole SMM stuff is fragile for various reasons...

Also another issue is that initial value is unknown. Because we do not
know if BIOS fan control is enabled or disabled.

I was told that in past BIOS fan control was old Dell laptops was
disabled, so if people adds old laptops into whilelist it would mean
that we even do not guess state of BIOS fan control status.

> > > Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> > > ---
> > >   Documentation/hwmon/dell-smm-hwmon.rst | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
> > > index 3bf77a5df995..d6fe9b8a2c40 100644
> > > --- a/Documentation/hwmon/dell-smm-hwmon.rst
> > > +++ b/Documentation/hwmon/dell-smm-hwmon.rst
> > > @@ -35,7 +35,7 @@ Name				Perm	Description
> > >   fan[1-3]_input                  RO      Fan speed in RPM.
> > >   fan[1-3]_label                  RO      Fan label.
> > >   pwm[1-3]                        RW      Control the fan PWM duty-cycle.
> > > -pwm1_enable                     WO      Enable or disable automatic BIOS fan
> > > +pwm1_enable                     RW      Enable or disable automatic BIOS fan
> > >                                           control (not supported on all laptops,
> > >                                           see below for details).
> > >   temp[1-10]_input                RO      Temperature reading in milli-degrees
> > > --
> > > 2.20.1
> > > 
> 

  parent reply	other threads:[~2021-05-28 21:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 17:37 [PATCH v2 0/6] Convert to new hwmon registration api W_Armin
2021-05-28 17:37 ` [PATCH v2 1/6] hwmon: (dell-smm-hwmon) Use platform device W_Armin
2021-05-28 18:53   ` Pali Rohár
2021-05-28 21:00     ` Armin Wolf
2021-05-28 17:37 ` [PATCH v2 2/6] hwmon: (dell-smm-hwmon) Mark functions as __init W_Armin
2021-05-28 18:56   ` Pali Rohár
2021-05-28 17:37 ` [PATCH v2 3/6] hwmon: (dell-smm-hwmon) Use devm_add_action_or_reset() W_Armin
2021-05-28 19:02   ` Pali Rohár
2021-05-28 17:37 ` [PATCH v2 4/6] hwmon: (dell-smm-hwmon) Move variables into a driver private data structure W_Armin
2021-05-28 17:37 ` [PATCH v2 5/6] hwmon: (dell-smm-hwmon) Convert to devm_hwmon_device_register_with_info() W_Armin
2021-05-28 17:37 ` [PATCH v2 6/6] hwmon: (dell-smm-hwmon) Update docs W_Armin
2021-05-28 17:53   ` Pali Rohár
2021-05-28 20:41     ` Armin Wolf
     [not found]     ` <90260e4f-7e3f-20af-7706-add965ae9192@gmx.de>
2021-05-28 21:10       ` Pali Rohár [this message]
2021-05-30 13:14       ` Guenter Roeck
2021-05-28 18:32 ` [PATCH v2 0/6] Convert to new hwmon registration api Pali Rohár
2021-05-28 18:40   ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210528211037.2tnblovgb3rkcwnq@pali \
    --to=pali@kernel.org \
    --cc=W_Armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.