acpi_ibm(4): Rename disengaged mode to unthrottled mode.

This mode was added in r362496.  Rename it to make the meaning more
clear.

PR:		247306
Suggested by:	rpokala
Submitted by:	Ali Abdallah <ali.abdallah@suse.com>
MFC with:	r362496
This commit is contained in:
Mark Johnston 2020-06-24 19:51:03 +00:00
parent d6701b6c8c
commit ddf1843203
2 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd June 19, 2020
.Dd June 24, 2020
.Dt ACPI_IBM 4
.Os
.Sh NAME
@ -293,7 +293,7 @@ is not set accordingly.
.It Va dev.acpi_ibm.0.fan_level
Indicates at what speed the fan should run when being in manual mode.
Valid values range from 0 (off) to 7 (max) and 8.
Level 8 is used by the driver to set the fan in disengaged mode.
Level 8 is used by the driver to set the fan in unthrottled mode.
In this mode, the fan is set to spin freely and will quickly reach a very
high speed.
Use this mode only if absolutely necessary, e.g., if the system has reached its
@ -311,7 +311,7 @@ off
.It Li 6, 7
~4300 RPM
.It Li 8
~6400 RPM (Full-speed, disengaged)
~6400 RPM (Full-speed, unthrottled)
.El
.It Va dev.acpi_ibm.0.fan_speed
(read-only)

View File

@ -106,7 +106,7 @@ ACPI_MODULE_NAME("IBM")
#define IBM_EC_MASK_MUTE (1 << 6)
#define IBM_EC_FANSTATUS 0x2F
#define IBM_EC_MASK_FANLEVEL 0x3f
#define IBM_EC_MASK_FANDISENGAGED (1 << 6)
#define IBM_EC_MASK_FANUNTHROTTLED (1 << 6)
#define IBM_EC_MASK_FANSTATUS (1 << 7)
#define IBM_EC_FANSPEED 0x84
@ -265,7 +265,7 @@ static struct {
.name = "fan_level",
.method = ACPI_IBM_METHOD_FANLEVEL,
.description = "Fan level, 0-7 (recommended max), "
"8 (disengaged, full-speed)",
"8 (unthrottled, full-speed)",
},
{
.name = "fan",
@ -831,7 +831,7 @@ acpi_ibm_sysctl_get(struct acpi_ibm_softc *sc, int method)
*/
if (!sc->fan_handle) {
ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1);
if (val_ec & IBM_EC_MASK_FANDISENGAGED)
if (val_ec & IBM_EC_MASK_FANUNTHROTTLED)
val = 8;
else
val = val_ec & IBM_EC_MASK_FANLEVEL;
@ -924,11 +924,11 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int method, int arg)
/* Read the current fan status. */
ACPI_EC_READ(sc->ec_dev, IBM_EC_FANSTATUS, &val_ec, 1);
val = val_ec & ~(IBM_EC_MASK_FANLEVEL |
IBM_EC_MASK_FANDISENGAGED);
IBM_EC_MASK_FANUNTHROTTLED);
if (arg == 8)
/* Full speed, set the disengaged bit. */
val |= 7 | IBM_EC_MASK_FANDISENGAGED;
/* Full speed, set the unthrottled bit. */
val |= 7 | IBM_EC_MASK_FANUNTHROTTLED;
else
val |= arg;