요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Kernel driver w83791d
=====================
Supported chips:
* Winbond W83791D
Prefix: 'w83791d'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf
Author: Charles Spirakis <bezaur@gmail.com>
This driver was derived from the w83781d.c and w83792d.c source files.
Credits:
w83781d.c:
- Frodo Looijaard <frodol@dds.nl>,
- Philip Edelbrock <phil@netroedge.com>,
- Mark Studebaker <mdsxyz123@yahoo.com>
w83792d.c:
- Shane Huang (Winbond),
- Rudolf Marek <r.marek@assembler.cz>
Additional contributors:
- Sven Anders <anders@anduras.de>
- Marc Hulsman <m.hulsman@tudelft.nl>
Module Parameters
-----------------
* init boolean
(default 0)
Use 'init=1' to have the driver do extra software initializations.
The default behavior is to do the minimum initialization possible
and depend on the BIOS to properly setup the chip. If you know you
have a w83791d and you're having problems, try init=1 before trying
reset=1.
* reset boolean
(default 0)
Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
behavior is no chip reset to preserve BIOS settings.
* force_subclients=bus,caddr,saddr,saddr
This is used to force the i2c addresses for subclients of
a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b`
to force the subclients of chip 0x2f on bus 0 to i2c addresses
0x4a and 0x4b.
Description
-----------
This driver implements support for the Winbond W83791D chip. The W83791G
chip appears to be the same as the W83791D but is lead free.
Detection of the chip can sometimes be foiled because it can be in an
internal state that allows no clean access (Bank with ID register is not
currently selected). If you know the address of the chip, use a 'force'
parameter; this will put it into a more well-behaved state first.
The driver implements three temperature sensors, ten voltage sensors,
five fan rotation speed sensors and manual PWM control of each fan.
Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
the temperature gets higher than the Overtemperature Shutdown value; it stays
on until the temperature falls below the Hysteresis value.
Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4, 8, 16,
32, 64 or 128 for all fans) to give the readings more range or accuracy.
Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
set for each fan separately. Valid values range from 0 (stop) to 255 (full).
PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
regulated to keep respectively temp 1-3 at a certain target temperature.
See below for the description of the sysfs-interface.
The w83791d has a global bit used to enable beeping from the speaker when an
alarm is triggered as well as a bitmask to enable or disable the beep for
specific alarms. You need both the global beep enable bit and the
corresponding beep bit to be on for a triggered alarm to sound a beep.
The sysfs interface to the global enable is via the sysfs beep_enable file.
This file is used for both legacy and new code.
The sysfs interface to the beep bitmask has migrated from the original legacy
method of a single sysfs beep_mask file to a newer method using multiple
`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
A similar change has occurred for the bitmap corresponding to the alarms. The
original legacy method used a single sysfs alarms file containing a bitmap
of triggered alarms. The newer method uses multiple sysfs `*_alarm` files
(again following the pattern described in sysfs-interface).
Since both methods read and write the underlying hardware, they can be used
interchangeably and changes in one will automatically be reflected by
the other. If you use the legacy bitmask method, your user-space code is
responsible for handling the fact that the alarms and beep_mask bitmaps
are not the same (see the table below).
NOTE: All new code should be written to use the newer sysfs-interface
specification as that avoids bitmap problems and is the preferred interface
going forward.
The driver reads the hardware chip values at most once every three seconds.
User mode code requesting values more often will receive cached values.
/sys files
----------
The sysfs-interface is documented in the 'sysfs-interface' file. Only
chip-specific options are documented here.
======================= =======================================================
pwm[1-3]_enable this file controls mode of fan/temperature control for
fan 1-3. Fan/PWM 4-5 only support manual mode.
* 1 Manual mode
* 2 Thermal Cruise mode
* 3 Fan Speed Cruise mode (no further support)
temp[1-3]_target defines the target temperature for Thermal Cruise mode.
Unit: millidegree Celsius
RW
temp[1-3]_tolerance temperature tolerance for Thermal Cruise mode.
Specifies an interval around the target temperature
in which the fan speed is not changed.
Unit: millidegree Celsius
RW
======================= =======================================================
Alarms bitmap vs. beep_mask bitmask
-----------------------------------
For legacy code using the alarms and beep_mask files:
============= ======== ========= ==========================
Signal Alarms beep_mask Obs
============= ======== ========= ==========================
in0 (VCORE) 0x000001 0x000001
in1 (VINR0) 0x000002 0x002000 <== mismatch
in2 (+3.3VIN) 0x000004 0x000004
in3 (5VDD) 0x000008 0x000008
in4 (+12VIN) 0x000100 0x000100
in5 (-12VIN) 0x000200 0x000200
in6 (-5VIN) 0x000400 0x000400
in7 (VSB) 0x080000 0x010000 <== mismatch
in8 (VBAT) 0x100000 0x020000 <== mismatch
in9 (VINR1) 0x004000 0x004000
temp1 0x000010 0x000010
temp2 0x000020 0x000020
temp3 0x002000 0x000002 <== mismatch
fan1 0x000040 0x000040
fan2 0x000080 0x000080
fan3 0x000800 0x000800
fan4 0x200000 0x200000
fan5 0x400000 0x400000
tart1 0x010000 0x040000 <== mismatch
tart2 0x020000 0x080000 <== mismatch
tart3 0x040000 0x100000 <== mismatch
case_open 0x001000 0x001000
global_enable - 0x800000 (modified via beep_enable)
============= ======== ========= ==========================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 장치와 모듈 매개변수
1-59이 드라이버는 Winbond W83791D를 지원합니다. 모듈 접두사는 `w83791d`이고 검색하는 I2C 주소는 `0x2c`부터 `0x2f`까지입니다. 원문은 W83791D/W83791Gb 데이터시트 주소를 제시합니다.
작성자는 Charles Spirakis이며, 드라이버는 `w83781d.c`와 `w83792d.c`를 바탕으로 만들어졌습니다. Frodo Looijaard, Philip Edelbrock, Mark Studebaker, Shane Huang, Rudolf Marek의 기존 작업과 Sven Anders, Marc Hulsman의 추가 기여를 명시합니다.
`init` 불리언 매개변수의 기본값은 0입니다. `init=1`을 지정하면 추가 소프트웨어 초기화를 수행합니다. 기본 동작은 가능한 최소한만 초기화하고 BIOS가 칩을 올바르게 구성했다고 가정합니다. W83791D가 확실한데 문제가 있으면 `reset=1`보다 먼저 `init=1`을 시도해야 합니다.
`reset` 불리언 매개변수의 기본값은 0입니다. `reset=1`은 인덱스 `0x40`의 비트 7을 사용해 칩을 재설정합니다. BIOS 설정을 보존하기 위해 기본 동작은 칩을 재설정하지 않습니다.
`force_subclients=bus,caddr,saddr,saddr`는 특정 칩의 하위 클라이언트 I2C 주소를 강제로 지정합니다. 예를 들어 `force_subclients=0,0x2f,0x4a,0x4b`는 버스 0의 칩 `0x2f`에 속한 하위 클라이언트를 `0x4a`와 `0x4b`에 배치합니다.
지원 주소, 계보와 안전한 초기화 순서를 정리합니다.
BIOS 구성을 우선 보존하면서 단계적으로 문제를 진단합니다.
Kernel driver w83791d
=====================
Supported chips:
* Winbond W83791D
Prefix: 'w83791d'
Addresses scanned: I2C 0x2c - 0x2f
Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf
Author: Charles Spirakis <bezaur@gmail.com>
This driver was derived from the w83781d.c and w83792d.c source files.
Credits:
w83781d.c:
- Frodo Looijaard <frodol@dds.nl>,
- Philip Edelbrock <phil@netroedge.com>,
- Mark Studebaker <mdsxyz123@yahoo.com>
w83792d.c:
- Shane Huang (Winbond),
- Rudolf Marek <r.marek@assembler.cz>
Additional contributors:
- Sven Anders <anders@anduras.de>
- Marc Hulsman <m.hulsman@tudelft.nl>
Module Parameters
-----------------
* init boolean
(default 0)
Use 'init=1' to have the driver do extra software initializations.
The default behavior is to do the minimum initialization possible
and depend on the BIOS to properly setup the chip. If you know you
have a w83791d and you're having problems, try init=1 before trying
reset=1.
* reset boolean
(default 0)
Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
behavior is no chip reset to preserve BIOS settings.
* force_subclients=bus,caddr,saddr,saddr
This is used to force the i2c addresses for subclients of
a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b`
to force the subclients of chip 0x2f on bus 0 to i2c addresses
0x4a and 0x4b.
센서 기능, 경보·비프와 sysfs
60-124드라이버는 Winbond W83791D를 지원합니다. W83791G는 W83791D와 같은 칩으로 보이지만 무연 제품입니다. ID 레지스터가 든 뱅크가 선택되지 않은 내부 상태에서는 깨끗하게 접근할 수 없어 자동 감지가 실패할 수 있습니다. 주소를 안다면 `force` 매개변수로 먼저 정상적인 접근 상태를 만들 수 있습니다.
칩은 온도 센서 3개, 전압 센서 10개, 팬 회전 속도 센서 5개와 각 팬의 수동 PWM 제어를 제공합니다. `temp1`의 온도 해상도는 1°C, `temp2`와 `temp3`은 0.5°C입니다. 온도가 과열 종료값을 넘으면 경보가 켜지고 히스테리시스 값 아래로 내려가야 꺼집니다.
IN 전압 센서는 밀리볼트 단위로 값을 보고하고, 프로그램 가능한 최솟값 또는 최댓값을 넘으면 경보를 냅니다. 팬 속도는 RPM으로 보고하며 프로그램한 최저 속도 아래로 떨어지면 경보가 발생합니다. 모든 팬의 측정값은 1, 2, 4, 8, 16, 32, 64, 128 중 하나의 분주기로 나눠 범위 또는 정확도를 조절할 수 있습니다.
각 팬은 PWM으로 제어되며 듀티 사이클을 팬별로 읽고 쓸 수 있습니다. 값은 0(정지)부터 255(전속)까지입니다. PWM 1~3은 각각 온도 1~3을 목표 온도로 유지하도록 자동 조절하는 Thermal Cruise 모드를 지원합니다.
W83791D에는 경보 발생 시 스피커 비프를 허용하는 전역 비트와 경보별 비프 비트마스크가 있습니다. 실제 소리를 내려면 전역 비프 허용 비트와 해당 경보 비트가 모두 켜져 있어야 합니다. 전역 설정은 구형 코드와 신형 코드 모두 `beep_enable` 파일을 사용합니다.
경보별 비프 인터페이스는 단일 `beep_mask` 파일에서 `Documentation/hwmon/sysfs-interface.rst`에 설명된 여러 `*_beep` 파일로 이동했습니다. 경보 인터페이스도 단일 `alarms` 비트맵에서 여러 `*_alarm` 파일로 바뀌었습니다. 두 방식은 같은 하드웨어를 읽고 쓰므로 함께 사용할 수 있지만, 구형 사용자 공간은 `alarms`와 `beep_mask`의 비트 배치가 서로 다름을 직접 처리해야 합니다. 새 코드는 비트맵 문제를 피하는 새 sysfs 인터페이스를 사용해야 합니다.
드라이버는 하드웨어 값을 최대 3초에 한 번만 읽습니다. 그보다 자주 값을 요청하면 캐시된 값을 반환합니다.
칩 고유 sysfs에서 `pwm[1-3]_enable`은 팬 1~3의 제어 모드를 정합니다. 1은 수동, 2는 Thermal Cruise, 3은 Fan Speed Cruise이며 마지막 모드는 추가 지원이 없습니다. 팬/PWM 4~5는 수동 모드만 지원합니다. `temp[1-3]_target`은 Thermal Cruise 목표 온도를 밀리섭씨로 읽고 쓰며, `temp[1-3]_tolerance`는 팬 속도를 바꾸지 않는 목표 온도 주변의 허용 구간을 밀리섭씨로 읽고 씁니다.
센서 수, 해상도, 제어 범위와 모드를 보존합니다.
측정값을 캐시하고 경보·비프와 팬 제어에 반영합니다.
Description
-----------
This driver implements support for the Winbond W83791D chip. The W83791G
chip appears to be the same as the W83791D but is lead free.
Detection of the chip can sometimes be foiled because it can be in an
internal state that allows no clean access (Bank with ID register is not
currently selected). If you know the address of the chip, use a 'force'
parameter; this will put it into a more well-behaved state first.
The driver implements three temperature sensors, ten voltage sensors,
five fan rotation speed sensors and manual PWM control of each fan.
Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
the temperature gets higher than the Overtemperature Shutdown value; it stays
on until the temperature falls below the Hysteresis value.
Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4, 8, 16,
32, 64 or 128 for all fans) to give the readings more range or accuracy.
Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
set for each fan separately. Valid values range from 0 (stop) to 255 (full).
PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
regulated to keep respectively temp 1-3 at a certain target temperature.
See below for the description of the sysfs-interface.
The w83791d has a global bit used to enable beeping from the speaker when an
alarm is triggered as well as a bitmask to enable or disable the beep for
specific alarms. You need both the global beep enable bit and the
corresponding beep bit to be on for a triggered alarm to sound a beep.
The sysfs interface to the global enable is via the sysfs beep_enable file.
This file is used for both legacy and new code.
The sysfs interface to the beep bitmask has migrated from the original legacy
method of a single sysfs beep_mask file to a newer method using multiple
`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
A similar change has occurred for the bitmap corresponding to the alarms. The
original legacy method used a single sysfs alarms file containing a bitmap
of triggered alarms. The newer method uses multiple sysfs `*_alarm` files
(again following the pattern described in sysfs-interface).
Since both methods read and write the underlying hardware, they can be used
interchangeably and changes in one will automatically be reflected by
the other. If you use the legacy bitmask method, your user-space code is
responsible for handling the fact that the alarms and beep_mask bitmaps
are not the same (see the table below).
NOTE: All new code should be written to use the newer sysfs-interface
specification as that avoids bitmap problems and is the preferred interface
going forward.
The driver reads the hardware chip values at most once every three seconds.
User mode code requesting values more often will receive cached values.
경보 비트맵과 비프 마스크
125-180구형 `alarms`와 `beep_mask` 파일을 사용하는 코드는 아래 매핑을 따라야 합니다. 일부 신호는 두 비트맵에서 같은 위치를 쓰지만 `in1`, `in7`, `in8`, `temp3`, `tart1`~`tart3`은 서로 다른 위치를 사용합니다.
`case_open`은 두 비트맵 모두 `0x001000`입니다. 전역 비프 허용은 경보 비트가 없고 `beep_mask`의 `0x800000`에 해당하며 `beep_enable`을 통해 수정합니다.
원문의 23개 신호 매핑과 불일치를 모두 보존합니다.
경보와 비프의 서로 다른 비트 위치를 안전하게 변환합니다.
/sys files
----------
The sysfs-interface is documented in the 'sysfs-interface' file. Only
chip-specific options are documented here.
======================= =======================================================
pwm[1-3]_enable this file controls mode of fan/temperature control for
fan 1-3. Fan/PWM 4-5 only support manual mode.
* 1 Manual mode
* 2 Thermal Cruise mode
* 3 Fan Speed Cruise mode (no further support)
temp[1-3]_target defines the target temperature for Thermal Cruise mode.
Unit: millidegree Celsius
RW
temp[1-3]_tolerance temperature tolerance for Thermal Cruise mode.
Specifies an interval around the target temperature
in which the fan speed is not changed.
Unit: millidegree Celsius
RW
======================= =======================================================
Alarms bitmap vs. beep_mask bitmask
-----------------------------------
For legacy code using the alarms and beep_mask files:
============= ======== ========= ==========================
Signal Alarms beep_mask Obs
============= ======== ========= ==========================
in0 (VCORE) 0x000001 0x000001
in1 (VINR0) 0x000002 0x002000 <== mismatch
in2 (+3.3VIN) 0x000004 0x000004
in3 (5VDD) 0x000008 0x000008
in4 (+12VIN) 0x000100 0x000100
in5 (-12VIN) 0x000200 0x000200
in6 (-5VIN) 0x000400 0x000400
in7 (VSB) 0x080000 0x010000 <== mismatch
in8 (VBAT) 0x100000 0x020000 <== mismatch
in9 (VINR1) 0x004000 0x004000
temp1 0x000010 0x000010
temp2 0x000020 0x000020
temp3 0x002000 0x000002 <== mismatch
fan1 0x000040 0x000040
fan2 0x000080 0x000080
fan3 0x000800 0x000800
fan4 0x200000 0x200000
fan5 0x400000 0x400000
tart1 0x010000 0x040000 <== mismatch
tart2 0x020000 0x080000 <== mismatch
tart3 0x040000 0x100000 <== mismatch
case_open 0x001000 0x001000
global_enable - 0x800000 (modified via beep_enable)
============= ======== ========= ==========================
요약·해설
w83791d.rst:1-180W83791D는 3개 온도, 10개 전압, 5개 팬과 PWM을 제공하며 구형 alarms와 beep_mask의 서로 다른 비트 배치를 주의해야 합니다.
원문 분량과 핵심 기능을 요약합니다.
장치 탐지부터 센서와 팬 제어 제공까지의 순서입니다.