Re: [PATCH v2 6/6] hwmon: (dell-smm-hwmon) Update docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx wrote:
> > > From: Armin Wolf <W_Armin@xxxxxx>
> > > 
> > > 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@xxxxxx>
> > > ---
> > >   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
> > > 
> 



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux