← Documents Documentation/hwmon/gpd-fan.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Kernel driver gpd-fan

GPD handheld EC fan control과 board quirk·manual 안전 동작입니다.

Source pathDocumentation/hwmon/gpd-fan.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

gpd-fan.rst:1-78

Board별 EC mapping과 manual 전환 시 PWM 255 안전 기본값을 설명합니다.

문서 개요
항목
SourceDocumentation/hwmon/gpd-fan.rst
분량78 source lines
Quirkwm2·win4·win_mini
PWM0..255

원문 분량과 핵심 범위입니다.

핵심 흐름
Board 식별Quirk 적용EC mode 선택RPM·PWM 감시

장치 동작의 기본 순서입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-or-later
2
3 Kernel driver gpd-fan
4 =========================
5
6 Author:
7 - Cryolitia PukNgae <cryolitia@uniontech.com>
8
9 Description
10 ------------
11
12 Handheld devices from Shenzhen GPD Technology Co., Ltd. provide fan readings
13 and fan control through their embedded controllers.
14
15 Supported devices
16 -----------------
17
18 Currently 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
32 Module parameters
33 -----------------
34
35 gpd_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
54 Sysfs entries
55 -------------
56
57 The following attributes are supported:
58
59 fan1_input
60 Read Only. Reads current fan RPM.
61
62 pwm1_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
71 pwm1
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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

GPD handheld 지원 목록

1-31

Shenzhen GPD Technology의 handheld는 embedded controller를 통해 fan reading과 fan control을 제공합니다. GPL-2.0-or-later 드라이버 저자는 Cryolitia PukNgae입니다.

지원 장치는 GPD Win Mini 7840U·8840U·HX370, GPD Pocket 4, GPD Duo, GPD Win Max 2 6800U, Win Max 2 2023 7840U, 2024 8840U, 2025 HX370, GPD Win 4 6800U·7840U입니다.

GPD 지원군
계열지원 model
Win Mini7840U, 8840U, HX370
Pocket·DuoPocket 4, Duo
Win Max 26800U, 2023 7840U, 2024 8840U, 2025 HX370
Win 46800U, 7840U

세 quirk 계열에 포함되는 handheld model입니다.

GPD fan 등록
Handheld model 식별적절한 board quirk 선택Embedded controller 연결RPM·PWM attribute 등록

Board model을 quirk와 연결해 EC control을 엽니다.

.. SPDX-License-Identifier: GPL-2.0-or-later

Kernel driver gpd-fan
=========================

Author:
    - Cryolitia PukNgae <cryolitia@uniontech.com>

Description
------------

Handheld devices from Shenzhen GPD Technology Co., Ltd. provide fan readings
and fan control through their embedded controllers.

Supported devices
-----------------

Currently the driver supports the following handhelds:

 - GPD Win Mini (7840U)
 - GPD Win Mini (8840U)
 - GPD Win Mini (HX370)
 - GPD Pocket 4
 - GPD Duo
 - GPD Win Max 2 (6800U)
 - GPD Win Max 2 2023 (7840U)
 - GPD Win Max 2 2024 (8840U)
 - GPD Win Max 2 2025 (HX370)
 - GPD Win 4 (6800U)
 - GPD Win 4 (7840U)

gpd_fan_board 강제 quirk

32-53

Module parameter `gpd_fan_board`는 사용할 module quirk를 강제로 지정합니다. 예를 들어 `gpd_fan_board=wm2`처럼 사용합니다.

`wm2`는 Win 4 7840U와 Win Max 2 6800U·2023 7840U·2024 8840U·2025 HX370에 사용합니다. `win4`는 Win 4 6800U용입니다. `win_mini`는 Win Mini 7840U·8840U·HX370, Pocket 4, Duo용입니다.

gpd_fan_board
대상
wm2Win 4 7840U; Win Max 2 계열
win4Win 4 6800U
win_miniWin Mini 계열; Pocket 4; Duo

강제 parameter 값과 대상 board입니다.

Quirk 강제
실제 model 확인wm2·win4·win_mini 선택Module parameter 지정EC register mapping 적용

자동 식별이 맞지 않을 때 명시적으로 board profile을 고릅니다.

Module parameters
-----------------

gpd_fan_board
  Force specific which module quirk should be used.
  Use it like "gpd_fan_board=wm2".

   - wm2
       - GPD Win 4 (7840U)
       - GPD Win Max 2 (6800U)
       - GPD Win Max 2 2023 (7840U)
       - GPD Win Max 2 2024 (8840U)
       - GPD Win Max 2 2025 (HX370)
   - win4
       - GPD Win 4 (6800U)
   - win_mini
       - GPD Win Mini (7840U)
       - GPD Win Mini (8840U)
       - GPD Win Mini (HX370)
       - GPD Pocket 4
       - GPD Duo

GPD fan sysfs와 안전 동작

54-78

`fan1_input`은 읽기 전용으로 현재 fan RPM을 제공합니다. `pwm1_enable`은 읽기·쓰기 가능하며 0은 control을 disable하고 full speed로 실행, 1은 manual, 2는 EC가 속도를 결정하는 automatic mode입니다. 읽으면 현재 상태를 확인할 수 있습니다.

장치 안전을 위해 manual mode로 바꾸면 기본 PWM speed를 maximum 255로 설정합니다. 이후 `pwm1`에 다른 값을 쓸 수 있습니다.

`pwm1`은 0~255 duty cycle을 읽고 씁니다. `pwm1_enable=1` manual일 때만 값을 써 fan speed를 정합니다. `wm2`에 나열된 board를 제외한 많은 board는 automatic mode에서 현재 PWM 읽기를 지원하지 않아 `EOPNOTSUPP`를 반환하지만 manual mode에서는 실제 값을 항상 반환합니다.

GPD fan ABI
Attribute동작
fan1_inputRPM, RO현재 fan speed
pwm1_enable0Control disable, full speed
pwm1_enable1Manual, 처음 255
pwm1_enable2EC automatic
pwm10..255, RWManual duty cycle
Auto readbackBoard 의존미지원 시 EOPNOTSUPP

EC·manual·full-speed mode와 PWM readback입니다.

안전한 manual 전환
pwm1_enable=1 쓰기Driver가 pwm1=255 설정Fan 최대 속도 확인원하는 pwm1 값 쓰기RPM 감시

전환 순간 최대 냉각을 보장한 뒤 사용자가 낮춥니다.

Sysfs entries
-------------

The following attributes are supported:

fan1_input
  Read Only. Reads current fan RPM.

pwm1_enable
  Read/Write. Enable manual fan control. Write "0" to disable control and run
  at full speed. Write "1" to set to manual, write "2" to let the EC control
  decide fan speed. Read this attribute to see current status.

  NB:In consideration of the safety of the device, when setting to manual mode,
  the pwm speed will be set to the maximum value (255) by default. You can set
  a different value by writing pwm1 later.

pwm1
  Read/Write. Read this attribute to see current duty cycle in the range
  [0-255]. When pwm1_enable is set to "1" (manual) write any value in the
  range [0-255] to set fan speed.

  NB: Many boards (except listed under wm2 above) don't support reading the
  current pwm value in auto mode. That will just return EOPNOTSUPP. In manual
  mode it will always return the real value.