← Documents Documentation/misc-devices/ad525x_dpot.rst GitHub 원문 ↗

Linux 6.18.37 · Misc devices

AD525x Digital Potentiometers

AD525x digital potentiometer의 startup EEPROM, 즉시 적용 RDAC, factory tolerance sysfs interface를 설명합니다.

Source pathDocumentation/misc-devices/ad525x_dpot.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

ad525x_dpot.rst:1-57

이 driver는 potentiometer의 지속 설정과 즉시 설정을 서로 다른 sysfs file로 분리합니다. `eeprom*`은 다음 startup 값을, `rdac*`은 현재 resistance 값을 바꿉니다.

AD525x sysfs 제어
eeprom*저장된 startup 값다음 기동
rdac*즉시 resistance 값현재 출력
tolerance*Factory 값Application 해석

세 file 유형은 저장값, 즉시값, 제조 tolerance라는 서로 다른 수명과 권한을 가집니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =============================
4 AD525x Digital Potentiometers
5 =============================
6
7 The ad525x_dpot driver exports a simple sysfs interface. This allows you to
8 work with the immediate resistance settings as well as update the saved startup
9 settings. Access to the factory programmed tolerance is also provided, but
10 interpretation of this settings is required by the end application according to
11 the specific part in use.
12
13 Files
14 =====
15
16 Each dpot device will have a set of eeprom, rdac, and tolerance files. How
17 many depends on the actual part you have, as will the range of allowed values.
18
19 The eeprom files are used to program the startup value of the device.
20
21 The rdac files are used to program the immediate value of the device.
22
23 The tolerance files are the read-only factory programmed tolerance settings
24 and may vary greatly on a part-by-part basis. For exact interpretation of
25 this field, please consult the datasheet for your part. This is presented
26 as a hex file for easier parsing.
27
28 Example
29 =======
30
31 Locate the device in your sysfs tree. This is probably easiest by going into
32 the common i2c directory and locating the device by the i2c slave address::
33
34 # ls /sys/bus/i2c/devices/
35 0-0022 0-0027 0-002f
36
37 So assuming the device in question is on the first i2c bus and has the slave
38 address of 0x2f, we descend (unrelated sysfs entries have been trimmed)::
39
40 # ls /sys/bus/i2c/devices/0-002f/
41 eeprom0 rdac0 tolerance0
42
43 You can use simple reads/writes to access these files::
44
45 # cd /sys/bus/i2c/devices/0-002f/
46
47 # cat eeprom0
48 0
49 # echo 10 > eeprom0
50 # cat eeprom0
51 10
52
53 # cat rdac0
54 5
55 # echo 3 > rdac0
56 # cat rdac0
57 3
58

3. 한국어 전문 번역

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

AD525x digital potentiometer

1-12

`ad525x_dpot` driver는 간단한 sysfs interface를 제공합니다. 이를 통해 즉시 적용할 resistance setting을 다루고 저장된 startup setting도 갱신할 수 있습니다.

Factory에서 programming한 tolerance에도 접근할 수 있지만, 그 값은 사용 중인 부품에 맞춰 최종 application이 해석해야 합니다.

.. SPDX-License-Identifier: GPL-2.0

=============================
AD525x Digital Potentiometers
=============================

The ad525x_dpot driver exports a simple sysfs interface.  This allows you to
work with the immediate resistance settings as well as update the saved startup
settings.  Access to the factory programmed tolerance is also provided, but
interpretation of this settings is required by the end application according to
the specific part in use.

Sysfs file

13-27

각 dpot device에는 `eeprom`, `rdac`, `tolerance` file 집합이 있습니다. File 수와 허용되는 값의 범위는 실제 부품에 따라 달라집니다.

FileAccess용도
eeprom*Read-writeDevice의 startup 값을 programming합니다.
rdac*Read-writeDevice에 즉시 적용할 값을 programming합니다.
tolerance*Read-onlyFactory-programmed tolerance입니다. 부품마다 크게 다를 수 있으므로 datasheet에 따라 해석하며 parsing하기 쉽도록 hexadecimal로 표시합니다.
Files
=====

Each dpot device will have a set of eeprom, rdac, and tolerance files.  How
many depends on the actual part you have, as will the range of allowed values.

The eeprom files are used to program the startup value of the device.

The rdac files are used to program the immediate value of the device.

The tolerance files are the read-only factory programmed tolerance settings
and may vary greatly on a part-by-part basis.  For exact interpretation of
this field, please consult the datasheet for your part.  This is presented
as a hex file for easier parsing.

접근 예

28-57

먼저 sysfs tree에서 device를 찾습니다. 일반적인 I2C directory에서 I2C slave address로 찾는 방법이 가장 쉽습니다.

# ls /sys/bus/i2c/devices/
0-0022  0-0027  0-002f

대상 device가 첫 번째 I2C bus에 있고 slave address가 `0x2f`라면 `/sys/bus/i2c/devices/0-002f/`로 들어갑니다. 관련 없는 항목을 제외하면 `eeprom0`, `rdac0`, `tolerance0`이 보입니다.

# cd /sys/bus/i2c/devices/0-002f/
# cat eeprom0
0
# echo 10 > eeprom0
# cat eeprom0
10

# cat rdac0
5
# echo 3 > rdac0
# cat rdac0
3

일반적인 file read/write로 startup EEPROM 값과 즉시 적용되는 RDAC 값을 읽고 변경할 수 있습니다.

Example
=======

Locate the device in your sysfs tree.  This is probably easiest by going into
the common i2c directory and locating the device by the i2c slave address::

        # ls /sys/bus/i2c/devices/
        0-0022  0-0027  0-002f

So assuming the device in question is on the first i2c bus and has the slave
address of 0x2f, we descend (unrelated sysfs entries have been trimmed)::

        # ls /sys/bus/i2c/devices/0-002f/
        eeprom0 rdac0 tolerance0

You can use simple reads/writes to access these files::

        # cd /sys/bus/i2c/devices/0-002f/

        # cat eeprom0
        0
        # echo 10 > eeprom0
        # cat eeprom0
        10

        # cat rdac0
        5
        # echo 3 > rdac0
        # cat rdac0
        3