요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Kernel driver max197
====================
Author:
* Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Supported chips:
* Maxim MAX197
Prefix: 'max197'
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf
* Maxim MAX199
Prefix: 'max199'
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf
Description
-----------
The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V,
12-Bit DAS with 8+4 Bus Interface and Fault Protection.
The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V,
while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199.
Platform data
-------------
The MAX197 platform data (defined in linux/platform_data/max197.h) should be
filled with a pointer to a conversion function, defined like::
int convert(u8 ctrl);
ctrl is the control byte to write to start a new conversion.
On success, the function must return the 12-bit raw value read from the chip,
or a negative error code otherwise.
Control byte format:
======= ========== ============================================
Bit Name Description
7,6 PD1,PD0 Clock and Power-Down modes
5 ACQMOD Internal or External Controlled Acquisition
4 RNG Full-scale voltage magnitude at the input
3 BIP Unipolar or Bipolar conversion mode
2,1,0 A2,A1,A0 Channel
======= ========== ============================================
Sysfs interface
---------------
============== ==============================================================
in[0-7]_input The conversion value for the corresponding channel.
RO
in[0-7]_min The lower limit (in mV) for the corresponding channel.
For the MAX197, it will be adjusted to -10000, -5000, or 0.
For the MAX199, it will be adjusted to -4000, -2000, or 0.
RW
in[0-7]_max The higher limit (in mV) for the corresponding channel.
For the MAX197, it will be adjusted to 0, 5000, or 10000.
For the MAX199, it will be adjusted to 0, 2000, or 4000.
RW
============== ==============================================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MAX197/MAX199 다중 범위 12비트 변환기
1-36Vivien Didelot가 작성한 이 드라이버는 `max197` 접두사의 Maxim MAX197과 `max199` 접두사의 MAX199를 지원합니다. 두 장치는 모두 8채널, 다중 범위, 5V, 12비트 데이터 수집 시스템이며 8+4 버스 인터페이스와 고장 보호 기능을 갖습니다.
MAX197의 입력 범위는 0 또는 -5V부터 +5V, 그리고 0 또는 -10V부터 +10V입니다. MAX199는 더 좁은 0 또는 -2V부터 +2V, 그리고 0 또는 -4V부터 +4V 범위를 사용합니다.
플랫폼 데이터는 `linux/platform_data/max197.h`에 정의되며 새 변환을 시작하는 제어 바이트 `ctrl`을 받는 `int convert(u8 ctrl);` 함수 포인터를 제공해야 합니다. 성공하면 칩에서 읽은 12비트 원시값을 반환하고 실패하면 음수 오류 코드를 반환합니다.
단극 또는 양극 모드와 전체 눈금 설정의 조합입니다.
플랫폼 변환 함수가 제어 바이트를 장치에 전달합니다.
Kernel driver max197
====================
Author:
* Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Supported chips:
* Maxim MAX197
Prefix: 'max197'
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX197.pdf
* Maxim MAX199
Prefix: 'max199'
Datasheet: http://datasheets.maxim-ic.com/en/ds/MAX199.pdf
Description
-----------
The A/D converters MAX197, and MAX199 are both 8-Channel, Multi-Range, 5V,
12-Bit DAS with 8+4 Bus Interface and Fault Protection.
The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to 10V,
while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199.
Platform data
-------------
The MAX197 platform data (defined in linux/platform_data/max197.h) should be
filled with a pointer to a conversion function, defined like::
제어 바이트와 채널별 sysfs 범위
37-70제어 바이트의 비트 7과 6인 `PD1`, `PD0`은 클록과 전원 차단 모드를 정합니다. 비트 5 `ACQMOD`는 내부 또는 외부 제어 획득, 비트 4 `RNG`는 입력 전체 눈금 전압 크기, 비트 3 `BIP`는 단극 또는 양극 변환 모드를 선택합니다. 비트 2:0의 `A2:A0`은 여덟 채널 중 하나를 지정합니다.
`in[0-7]_input`은 해당 채널의 읽기 전용 변환값입니다. `in[0-7]_min`과 `in[0-7]_max`는 mV 단위의 쓰기 가능한 하한·상한이며, 요청값은 칩이 지원하는 단계로 조정됩니다.
MAX197 하한은 `-10000`, `-5000`, `0` 중 하나이고 상한은 `0`, `5000`, `10000` 중 하나입니다. MAX199 하한은 `-4000`, `-2000`, `0`, 상한은 `0`, `2000`, `4000` 중 하나로 맞춰집니다.
각 비트가 변환 조건을 결정합니다.
사용자 요청을 칩이 지원하는 이산 범위로 맞춥니다.
int convert(u8 ctrl);
ctrl is the control byte to write to start a new conversion.
On success, the function must return the 12-bit raw value read from the chip,
or a negative error code otherwise.
Control byte format:
======= ========== ============================================
Bit Name Description
7,6 PD1,PD0 Clock and Power-Down modes
5 ACQMOD Internal or External Controlled Acquisition
4 RNG Full-scale voltage magnitude at the input
3 BIP Unipolar or Bipolar conversion mode
2,1,0 A2,A1,A0 Channel
======= ========== ============================================
Sysfs interface
---------------
============== ==============================================================
in[0-7]_input The conversion value for the corresponding channel.
RO
in[0-7]_min The lower limit (in mV) for the corresponding channel.
For the MAX197, it will be adjusted to -10000, -5000, or 0.
For the MAX199, it will be adjusted to -4000, -2000, or 0.
RW
in[0-7]_max The higher limit (in mV) for the corresponding channel.
For the MAX197, it will be adjusted to 0, 5000, or 10000.
For the MAX199, it will be adjusted to 0, 2000, or 4000.
RW
============== ==============================================================
요약·해설
max197.rst:1-70플랫폼 변환 함수가 채널·극성·전체 눈금 제어 바이트를 전달하고 sysfs 범위를 지원 단계로 조정합니다.
원문 분량과 핵심 인터페이스입니다.
장치 등록부터 측정·경보 처리까지의 순서입니다.