xref: /linux/Documentation/hwmon/gpd-fan.rst (revision 68a052239fc4b351e961f698b824f7654a346091)
1.. SPDX-License-Identifier: GPL-2.0-or-later
2
3Kernel driver gpd-fan
4=========================
5
6Author:
7    - Cryolitia PukNgae <cryolitia@uniontech.com>
8
9Description
10------------
11
12Handheld devices from Shenzhen GPD Technology Co., Ltd. provide fan readings
13and fan control through their embedded controllers.
14
15Supported devices
16-----------------
17
18Currently the driver supports the following handhelds:
19
20 - GPD Win Mini (7840U)
21 - GPD Win Mini (8840U)
22 - GPD Win Mini (HX370)
23 - GPD Pocket 4
24 - GPD Duo
25 - GPD Win Max 2 (6800U)
26 - GPD Win Max 2 2023 (7840U)
27 - GPD Win Max 2 2024 (8840U)
28 - GPD Win Max 2 2025 (HX370)
29 - GPD Win 4 (6800U)
30 - GPD Win 4 (7840U)
31
32Module parameters
33-----------------
34
35gpd_fan_board
36  Force specific which module quirk should be used.
37  Use it like "gpd_fan_board=wm2".
38
39   - wm2
40       - GPD Win 4 (7840U)
41       - GPD Win Max 2 (6800U)
42       - GPD Win Max 2 2023 (7840U)
43       - GPD Win Max 2 2024 (8840U)
44       - GPD Win Max 2 2025 (HX370)
45   - win4
46       - GPD Win 4 (6800U)
47   - win_mini
48       - GPD Win Mini (7840U)
49       - GPD Win Mini (8840U)
50       - GPD Win Mini (HX370)
51       - GPD Pocket 4
52       - GPD Duo
53
54Sysfs entries
55-------------
56
57The following attributes are supported:
58
59fan1_input
60  Read Only. Reads current fan RPM.
61
62pwm1_enable
63  Read/Write. Enable manual fan control. Write "0" to disable control and run
64  at full speed. Write "1" to set to manual, write "2" to let the EC control
65  decide fan speed. Read this attribute to see current status.
66
67  NB:In consideration of the safety of the device, when setting to manual mode,
68  the pwm speed will be set to the maximum value (255) by default. You can set
69  a different value by writing pwm1 later.
70
71pwm1
72  Read/Write. Read this attribute to see current duty cycle in the range
73  [0-255]. When pwm1_enable is set to "1" (manual) write any value in the
74  range [0-255] to set fan speed.
75
76  NB: Many boards (except listed under wm2 above) don't support reading the
77  current pwm value in auto mode. That will just return EOPNOTSUPP. In manual
78  mode it will always return the real value.
79