162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci===========================
462306a36Sopenharmony_ciACPI Fan Performance States
562306a36Sopenharmony_ci===========================
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciWhen the optional _FPS object is present under an ACPI device representing a
862306a36Sopenharmony_cifan (for example, PNP0C0B or INT3404), the ACPI fan driver creates additional
962306a36Sopenharmony_ci"state*" attributes in the sysfs directory of the ACPI device in question.
1062306a36Sopenharmony_ciThese attributes list properties of fan performance states.
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciFor more information on _FPS refer to the ACPI specification at:
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_cihttp://uefi.org/specifications
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciFor instance, the contents of the INT3404 ACPI device sysfs directory
1762306a36Sopenharmony_cimay look as follows::
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci $ ls -l /sys/bus/acpi/devices/INT3404:00/
2062306a36Sopenharmony_ci total 0
2162306a36Sopenharmony_ci ...
2262306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state0
2362306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state1
2462306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state10
2562306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state11
2662306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state2
2762306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state3
2862306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state4
2962306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state5
3062306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state6
3162306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state7
3262306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state8
3362306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 20:38 state9
3462306a36Sopenharmony_ci -r--r--r-- 1 root root 4096 Dec 13 01:00 status
3562306a36Sopenharmony_ci ...
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciwhere each of the "state*" files represents one performance state of the fan
3862306a36Sopenharmony_ciand contains a colon-separated list of 5 integer numbers (fields) with the
3962306a36Sopenharmony_cifollowing interpretation::
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci  control_percent:trip_point_index:speed_rpm:noise_level_mdb:power_mw
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci* ``control_percent``: The percent value to be used to set the fan speed to a
4462306a36Sopenharmony_ci  specific level using the _FSL object (0-100).
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci* ``trip_point_index``: The active cooling trip point number that corresponds
4762306a36Sopenharmony_ci  to this performance state (0-9).
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci* ``speed_rpm``: Speed of the fan in rotations per minute.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci* ``noise_level_mdb``: Audible noise emitted by the fan in this state in
5262306a36Sopenharmony_ci  millidecibels.
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci* ``power_mw``: Power draw of the fan in this state in milliwatts.
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciFor example::
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci $cat /sys/bus/acpi/devices/INT3404:00/state1
5962306a36Sopenharmony_ci 25:0:3200:12500:1250
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciWhen a given field is not populated or its value provided by the platform
6262306a36Sopenharmony_cifirmware is invalid, the "not-defined" string is shown instead of the value.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ciACPI Fan Fine Grain Control
6562306a36Sopenharmony_ci=============================
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciWhen _FIF object specifies support for fine grain control, then fan speed
6862306a36Sopenharmony_cican be set from 0 to 100% with the recommended minimum "step size" via
6962306a36Sopenharmony_ci_FSL object. User can adjust fan speed using thermal sysfs cooling device.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciHere use can look at fan performance states for a reference speed (speed_rpm)
7262306a36Sopenharmony_ciand set it by changing cooling device cur_state. If the fine grain control
7362306a36Sopenharmony_ciis supported then user can also adjust to some other speeds which are
7462306a36Sopenharmony_cinot defined in the performance states.
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ciThe support of fine grain control is presented via sysfs attribute
7762306a36Sopenharmony_ci"fine_grain_control". If fine grain control is present, this attribute
7862306a36Sopenharmony_ciwill show "1" otherwise "0".
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciThis sysfs attribute is presented in the same directory as performance states.
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ciACPI Fan Performance Feedback
8362306a36Sopenharmony_ci=============================
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciThe optional _FST object provides status information for the fan device.
8662306a36Sopenharmony_ciThis includes field to provide current fan speed in revolutions per minute
8762306a36Sopenharmony_ciat which the fan is rotating.
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciThis speed is presented in the sysfs using the attribute "fan_speed_rpm",
9062306a36Sopenharmony_ciin the same directory as performance states.
91