요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
CMA3000-D0x Accelerometer
=========================
Supported chips:
* VTI CMA3000-D0x
Datasheet:
CMA3000-D0X Product Family Specification 8281000A.02.pdf
<http://www.vti.fi/en/>
:Author: Hemanth V <hemanthv@ti.com>
Description
-----------
CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and
Free fall modes.
Motion Detect Mode:
Its the low power mode where interrupts are generated only
when motion exceeds the defined thresholds.
Measurement Mode:
This mode is used to read the acceleration data on X,Y,Z
axis and supports 400, 100, 40 Hz sample frequency.
Free fall Mode:
This mode is intended to save system resources.
Threshold values:
Chip supports defining threshold values for above modes
which includes time and g value. Refer product specifications for
more details.
CMA3000 chip supports mutually exclusive I2C and SPI interfaces for
communication, currently the driver supports I2C based communication only.
Initial configuration for bus mode is set in non volatile memory and can later
be modified through bus interface command.
Driver reports acceleration data through input subsystem. It generates ABS_MISC
event with value 1 when free fall is detected.
Platform data need to be configured for initial default values.
Platform Data
-------------
fuzz_x:
Noise on X Axis
fuzz_y:
Noise on Y Axis
fuzz_z:
Noise on Z Axis
g_range:
G range in milli g i.e 2000 or 8000
mode:
Default Operating mode
mdthr:
Motion detect g range threshold value
mdfftmr:
Motion detect and free fall time threshold value
ffthr:
Free fall g range threshold value
Input Interface
---------------
Input driver version is 1.0.0
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "cma3000-accelerometer"
Supported events::
Event type 0 (Sync)
Event type 3 (Absolute)
Event code 0 (X)
Value 47
Min -8000
Max 8000
Fuzz 200
Event code 1 (Y)
Value -28
Min -8000
Max 8000
Fuzz 200
Event code 2 (Z)
Value 905
Min -8000
Max 8000
Fuzz 200
Event code 40 (Misc)
Value 0
Min 0
Max 1
Event type 4 (Misc)
Register/Platform parameters Description
----------------------------------------
mode::
0: power down mode
1: 100 Hz Measurement mode
2: 400 Hz Measurement mode
3: 40 Hz Measurement mode
4: Motion Detect mode (default)
5: 100 Hz Free fall mode
6: 40 Hz Free fall mode
7: Power off mode
grange::
2000: 2000 mg or 2G Range
8000: 8000 mg or 8G Range
mdthr::
X: X * 71mg (8G Range)
X: X * 18mg (2G Range)
mdfftmr::
X: (X & 0x70) * 100 ms (MDTMR)
(X & 0x0F) * 2.5 ms (FFTMR 400 Hz)
(X & 0x0F) * 10 ms (FFTMR 100 Hz)
ffthr::
X: (X >> 2) * 18mg (2G Range)
X: (X & 0x0F) * 71 mg (8G Range)
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 칩, 동작 모드와 버스
1-44이 드라이버는 VTI CMA3000-D0x 3축 가속도계를 지원합니다. 기준 자료는 `CMA3000-D0X Product Family Specification 8281000A.02.pdf`이며 원문은 VTI 웹사이트를 링크합니다. 문서 작성자는 Texas Instruments의 Hemanth V입니다.
센서가 제공하는 세 가지 기능 모드를 비교합니다.
각 모드에는 시간과 g 값을 포함하는 임계값을 정의할 수 있습니다. 정확한 범위와 동작은 제품 명세를 참조해야 합니다.
CMA3000은 I2C와 SPI 인터페이스 중 하나를 상호 배타적으로 사용합니다. 현재 이 드라이버는 I2C 통신만 지원합니다. 초기 버스 모드는 비휘발성 메모리에 저장되어 있으며 이후 버스 인터페이스 명령으로 바꿀 수 있습니다.
칩 기능과 현재 드라이버 지원 범위를 구분합니다.
드라이버는 가속도 데이터를 Linux input subsystem으로 보고합니다. 자유 낙하를 감지하면 값 1의 `ABS_MISC` 이벤트를 생성합니다. 초기 기본값을 위해 platform data를 구성해야 합니다.
센서 구성부터 input 이벤트 보고까지의 흐름입니다.
CMA3000-D0x Accelerometer
=========================
Supported chips:
* VTI CMA3000-D0x
Datasheet:
CMA3000-D0X Product Family Specification 8281000A.02.pdf
<http://www.vti.fi/en/>
:Author: Hemanth V <hemanthv@ti.com>
Description
-----------
CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and
Free fall modes.
Motion Detect Mode:
Its the low power mode where interrupts are generated only
when motion exceeds the defined thresholds.
Measurement Mode:
This mode is used to read the acceleration data on X,Y,Z
axis and supports 400, 100, 40 Hz sample frequency.
Free fall Mode:
This mode is intended to save system resources.
Threshold values:
Chip supports defining threshold values for above modes
which includes time and g value. Refer product specifications for
more details.
CMA3000 chip supports mutually exclusive I2C and SPI interfaces for
communication, currently the driver supports I2C based communication only.
Initial configuration for bus mode is set in non volatile memory and can later
be modified through bus interface command.
Driver reports acceleration data through input subsystem. It generates ABS_MISC
event with value 1 when free fall is detected.
Platform data need to be configured for initial default values.
플랫폼 데이터 필드
45-72보드 코드는 다음 platform data 필드로 센서의 초기 기본값을 지정합니다. `fuzz_x`, `fuzz_y`, `fuzz_z`는 각 축 입력의 잡음 허용량이며, 나머지 필드는 g 범위·기본 모드·움직임 및 자유 낙하 임계값을 정합니다.
원문에 열거된 모든 초기 구성 필드입니다.
보드별 초기 센서 설정의 의존 관계입니다.
Platform Data
-------------
fuzz_x:
Noise on X Axis
fuzz_y:
Noise on Y Axis
fuzz_z:
Noise on Z Axis
g_range:
G range in milli g i.e 2000 or 8000
mode:
Default Operating mode
mdthr:
Motion detect g range threshold value
mdfftmr:
Motion detect and free fall time threshold value
ffthr:
Free fall g range threshold value
Linux input 인터페이스와 이벤트 범위
73-105input 드라이버 버전은 1.0.0입니다. 장치 ID는 bus `0x18`, vendor `0x0`, product `0x0`, version `0x0`이며 장치 이름은 `cma3000-accelerometer`입니다.
드라이버가 등록하는 이름과 ID입니다.
원문 예제의 현재값, 최소·최대와 fuzz를 축별로 보존합니다.
X/Y/Z는 absolute event code 0/1/2로 보고되고 예제 범위는 -8000~8000, fuzz는 200입니다. Misc code 40은 0~1 범위이며 자유 낙하 감지 시 `ABS_MISC=1`을 보고하는 데 사용됩니다.
센서 값이 Linux input event로 묶이는 방식입니다.
Input Interface
---------------
Input driver version is 1.0.0
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "cma3000-accelerometer"
Supported events::
Event type 0 (Sync)
Event type 3 (Absolute)
Event code 0 (X)
Value 47
Min -8000
Max 8000
Fuzz 200
Event code 1 (Y)
Value -28
Min -8000
Max 8000
Fuzz 200
Event code 2 (Z)
Value 905
Min -8000
Max 8000
Fuzz 200
Event code 40 (Misc)
Value 0
Min 0
Max 1
Event type 4 (Misc)
레지스터 모드와 임계값 계산
106-139플랫폼·레지스터 모드 번호와 동작입니다.
가속도 측정 범위 선택값입니다.
선택한 g 범위에 따른 레지스터 X의 환산입니다.
상위 비트 MDTMR와 하위 비트 FFTMR의 샘플 주기별 계산입니다.
g 범위별 자유 낙하 임계값 환산입니다.
`mode` 4가 기본 Motion Detect이고, 측정 모드는 40/100/400Hz를 각각 값 3/1/2로 선택합니다. 자유 낙하 모드는 100Hz 값 5와 40Hz 값 6을 제공합니다. 임계값을 계산할 때는 선택한 2G 또는 8G 범위와 FFTMR 샘플 주기를 반드시 함께 적용해야 합니다.
레지스터 값 X를 실제 g와 시간으로 해석하는 기준입니다.
Register/Platform parameters Description
----------------------------------------
mode::
0: power down mode
1: 100 Hz Measurement mode
2: 400 Hz Measurement mode
3: 40 Hz Measurement mode
4: Motion Detect mode (default)
5: 100 Hz Free fall mode
6: 40 Hz Free fall mode
7: Power off mode
grange::
2000: 2000 mg or 2G Range
8000: 8000 mg or 8G Range
mdthr::
X: X * 71mg (8G Range)
X: X * 18mg (2G Range)
mdfftmr::
X: (X & 0x70) * 100 ms (MDTMR)
(X & 0x0F) * 2.5 ms (FFTMR 400 Hz)
(X & 0x0F) * 10 ms (FFTMR 100 Hz)
ffthr::
X: (X >> 2) * 18mg (2G Range)
X: (X & 0x0F) * 71 mg (8G Range)
요약·해설
cma3000_d0x.rst:1-139CMA3000-D0x 드라이버는 I2C로 3축 가속도, 움직임과 자유 낙하를 Linux input subsystem에 전달합니다. 보드별 platform data에서 축 잡음, 2G/8G 범위, 기본 모드와 시간·g 임계값을 정확히 설정해야 합니다.
지원 기능과 Linux 입력 표현을 요약합니다.
플랫폼 설정에서 이벤트 보고까지의 핵심 단계입니다.