요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Bulk conversion timing and feature checks
sysfs-driver-w1_therm:111-190Bus-wide bulk conversion, measured conversion timeout과 success/completion checks를 bitmask로 제어합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/w1/devices/.../alarms
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RW) read or write TH and TL (Temperature High an Low) alarms.
Values shall be space separated and in the device range
(typical -55 degC to 125 degC), if not values will be trimmed
to device min/max capabilities. Values are integer as they are
stored in a 8bit register in the device. Lowest value is
automatically put to TL. Once set, alarms could be search at
master level, refer to Documentation/w1/w1-generic.rst for
detailed information
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../eeprom_cmd
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(WO) writing that file will either trigger a save of the
device data to its embedded EEPROM, either restore data
embedded in device EEPROM. Be aware that devices support
limited EEPROM writing cycles (typical 50k)
* 'save': save device RAM to EEPROM
* 'restore': restore EEPROM data in device RAM
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../ext_power
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RO) return the power status by asking the device
* '0': device parasite powered
* '1': device externally powered
* '-xx': xx is kernel error when reading power status
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../resolution
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RW) get or set the device resolution (on supported devices,
if not, this entry is not present). Note that the resolution
will be changed only in device RAM, so it will be cleared when
power is lost. Trigger a 'save' to EEPROM command to keep
values after power-on. Read or write are :
* '9..14': device resolution in bit
or resolution to set in bit
* '-xx': xx is kernel error when reading the resolution
* Anything else: do nothing
Some DS18B20 clones are fixed in 12-bit resolution, so the
actual resolution is read back from the chip and verified. Error
is reported if the results differ.
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../temperature
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RO) return the temperature in 1/1000 degC.
* If a bulk read has been triggered, it will directly
return the temperature computed when the bulk read
occurred, if available. If not yet available, nothing
is returned (a debug kernel message is sent), you
should retry later on.
* If no bulk read has been triggered, it will trigger
a conversion and send the result. Note that the
conversion duration depend on the resolution (if
device support this feature). It takes 94ms in 9bits
resolution, 750ms for 12bits.
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../w1_slave
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RW) return the temperature in 1/1000 degC.
*read*: return 2 lines with the hexa output data sent on the
bus, return the CRC check and temperature in 1/1000 degC
*write*:
* '0' : save the 2 or 3 bytes to the device EEPROM
(i.e. TH, TL and config register)
* '9..14' : set the device resolution in RAM
(if supported)
* Anything else: do nothing
refer to Documentation/w1/slaves/w1_therm.rst for detailed
information.
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read
Date: May 2020
Contact: Akira Shimahara <akira215corp@gmail.com>
Description:
(RW) trigger a bulk read conversion. read the status
*read*:
* '-1':
conversion in progress on at least 1 sensor
* '1' :
conversion complete but at least one sensor
value has not been read yet
* '0' :
no bulk operation. Reading temperature will
trigger a conversion on each device
*write*:
'trigger': trigger a bulk read on all supporting
devices on the bus
Note that if a bulk read is sent but one sensor is not read
immediately, the next access to temperature on this device
will return the temperature measured at the time of issue
of the bulk read command (not the current temperature).
Users: any user space application which wants to communicate with
w1_term device
What: /sys/bus/w1/devices/.../conv_time
Date: July 2020
Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
Description:
(RW) Get, set, or measure a temperature conversion time. The
setting remains active until a resolution change. Then it is
reset to default (datasheet) conversion time for a new
resolution.
*read*:
Actual conversion time in milliseconds.
*write*:
* '0':
Set the default conversion time from the datasheet.
* '1':
Measure and set the conversion time. Make a single
temperature conversion, measure an actual value.
Increase it by 20% for temperature range. A new
conversion time can be obtained by reading this
same attribute.
* other positive value:
Set the conversion time in milliseconds.
Users: An application using the w1_term device
What: /sys/bus/w1/devices/.../features
Date: July 2020
Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
Description:
(RW) Control optional driver settings.
Bit masks to read/write (bitwise OR):
== ============================================================
1 Enable check for conversion success. If byte 6 of
scratchpad memory is 0xC after conversion, and
temperature reads 85.00 (powerup value) or 127.94
(insufficient power) - return a conversion error.
2 Enable poll for conversion completion. Generate read cycles
after the conversion start and wait for 1's. In parasite
power mode this feature is not available.
== ============================================================
*read*:
Currently selected features.
*write*:
Select features.
Users: An application using the w1_term device
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
1-Wire temperature alarm thresholds
1-16| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../alarms |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | TH와 TL(Temperature High/Low) alarms를 읽거나 씁니다. Values는 space-separated integers이고 device range, 일반적으로 -55°C~125°C 안이어야 합니다. 범위를 벗어난 값은 device minimum/maximum capability로 trimmed됩니다. Device의 8-bit register에 저장되므로 integer만 사용하며 두 값 중 낮은 값이 자동으로 TL에 배치됩니다. 설정 후 master level에서 alarms를 검색할 수 있고 자세한 내용은 `Documentation/w1/w1-generic.rst`를 참조합니다. |
| Access | Read-write |
| Users | w1_term device와 통신하려는 모든 user-space application |
입력값 정규화와 TH/TL 배치 규칙입니다.
1-Wire thermometer EEPROM command
17-32| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../eeprom_cmd |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | Device data를 embedded EEPROM에 저장하거나 EEPROM data를 device RAM으로 복원합니다. Devices의 EEPROM write cycles는 제한적이며 일반적으로 약 50,000회입니다. `save`는 device RAM을 EEPROM에 저장하고 `restore`는 EEPROM data를 device RAM으로 복원합니다. |
| Access | Write-only |
| Users | w1_term device와 통신하려는 모든 user-space application |
RAM과 EEPROM 사이의 data 이동 방향입니다.
1-Wire thermometer power source
33-46| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../ext_power |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | Device에 질의해 power status를 반환합니다. `0`은 parasite-powered, `1`은 externally powered device이고 `-xx`는 power status를 읽는 동안 발생한 kernel error `xx`입니다. |
| Access | Read-only |
| Users | w1_term device와 통신하려는 모든 user-space application |
Power source 또는 read error를 구분합니다.
1-Wire thermometer resolution
47-68| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../resolution |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | 지원 device의 resolution을 읽거나 설정합니다. Unsupported device에는 이 entry가 없습니다. 변경은 device RAM에만 적용되므로 power loss 때 사라지며 power-on 후에도 유지하려면 EEPROM `save` command를 실행해야 합니다. `9..14`는 bit resolution을 읽거나 설정하고 `-xx`는 read 중 kernel error이며 다른 입력은 아무 동작도 하지 않습니다. 일부 DS18B20 clones는 12-bit로 fixed되어 있어 driver가 chip에서 actual resolution을 다시 읽어 검증하고 결과가 다르면 error를 보고합니다. |
| Access | Read-write |
| Users | w1_term device와 통신하려는 모든 user-space application |
Accepted values, errors와 persistence입니다.
1-Wire thermometer temperature
69-89| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../temperature |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | Temperature를 1/1000°C 단위로 반환합니다. Bulk read가 triggered되었고 결과가 available하면 bulk read 시점의 계산된 temperature를 즉시 반환합니다. 아직 available하지 않으면 아무것도 반환하지 않고 debug kernel message를 보내므로 나중에 retry해야 합니다. Bulk read가 없으면 conversion을 trigger한 뒤 결과를 반환합니다. Conversion duration은 지원 device의 resolution에 따라 달라지며 9-bit에서 94ms, 12-bit에서 750ms입니다. |
| Access | Read-only |
| Users | w1_term device와 통신하려는 모든 user-space application |
Bulk conversion 유무에 따른 read behavior입니다.
1-Wire thermometer raw slave interface
90-110| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../w1_slave |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | Read하면 bus가 보낸 hexadecimal output data 두 줄, CRC check와 1/1000°C temperature를 반환합니다. Write value `0`은 2~3 bytes, 즉 TH, TL과 configuration register를 device EEPROM에 저장합니다. `9..14`는 지원되는 경우 device RAM의 resolution을 설정하고 다른 입력은 아무 동작도 하지 않습니다. 자세한 내용은 `Documentation/w1/slaves/w1_therm.rst`를 참조합니다. |
| Access | Read-write |
| Users | w1_term device와 통신하려는 모든 user-space application |
Raw read output과 write commands입니다.
1-Wire bus bulk temperature conversion
111-138| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read |
| Date | 2020년 5월 |
| Contact | Akira Shimahara <akira215corp@gmail.com> |
| Description | Bus의 지원 devices 전체에 bulk read conversion을 trigger하고 status를 읽습니다. Read `-1`은 sensor 하나 이상에서 conversion 진행 중, `1`은 conversion은 complete지만 하나 이상의 sensor value가 아직 read되지 않음, `0`은 bulk operation 없음이며 이후 temperature read가 device별 conversion을 trigger함을 뜻합니다. `trigger`를 쓰면 bulk read를 시작합니다. Bulk command 후 sensor를 즉시 읽지 않아도 다음 temperature access는 current temperature가 아니라 command issue 시점의 measurement를 반환합니다. |
| Access | Read-write |
| Users | w1_term device와 통신하려는 모든 user-space application |
Bulk conversion lifecycle과 write trigger입니다.
1-Wire temperature conversion time
139-165| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../conv_time |
| Date | 2020년 7월 |
| Contact | Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> |
| Description | Temperature conversion time을 읽고 설정하거나 측정합니다. Setting은 resolution 변경 전까지 유지되고 resolution이 바뀌면 새 resolution의 datasheet default로 reset됩니다. Read는 actual conversion time을 milliseconds로 반환합니다. Write `0`은 datasheet default를 설정합니다. Write `1`은 conversion 한 번의 actual time을 측정하고 temperature range를 위해 20% 늘려 설정하며 같은 attribute를 읽어 새 값을 확인할 수 있습니다. 다른 positive value는 milliseconds 단위 conversion time을 직접 설정합니다. |
| Access | Read-write |
| Users | w1_term device를 사용하는 application |
Special values와 direct millisecond setting입니다.
1-Wire thermometer optional features
166-190| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/w1/devices/.../features |
| Date | 2020년 7월 |
| Contact | Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> |
| Description | Optional driver settings를 bitmask로 제어하며 bits는 bitwise OR할 수 있습니다. Bit 1은 conversion 성공 검사를 enable합니다. Conversion 후 scratchpad byte 6이 `0xC`이고 temperature가 85.00(power-up value) 또는 127.94(insufficient power)이면 conversion error를 반환합니다. Bit 2는 conversion-completion polling을 enable해 conversion start 후 read cycles를 생성하고 1을 기다리며 parasite-power mode에서는 사용할 수 없습니다. Read는 selected features를 반환하고 write는 features를 선택합니다. |
| Access | Read-write |
| Users | w1_term device를 사용하는 application |
Bitwise-OR 가능한 optional driver settings입니다.
Per-device temperature and persistence controls
sysfs-driver-w1_therm:1-110Alarm·resolution·temperature와 raw slave interface는 RAM/EEPROM persistence와 conversion resolution에 따라 동작이 달라집니다.