요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux
Required properties:
- compatible : Should be one of
* "adi,adgs1408"
* "adi,adgs1409"
* Standard mux-controller bindings as described in mux-controller.yaml
Optional properties for ADGS1408/1409:
- gpio-controller : if present, #gpio-cells is required.
- #gpio-cells : should be <2>
- First cell is the GPO line number, i.e. 0 to 3
for ADGS1408 and 0 to 4 for ADGS1409
- Second cell is used to specify active high (0)
or active low (1)
Optional properties:
- idle-state : if present, the state that the mux controller will have
when idle. The special state MUX_IDLE_AS_IS is the default and
MUX_IDLE_DISCONNECT is also supported.
States 0 through 7 correspond to signals S1 through S8 in the datasheet.
For ADGS1409 only states 0 to 3 are available.
Example:
/*
* One mux controller.
* Mux state set to idle as is (no idle-state declared)
*/
&spi0 {
mux: mux-controller@0 {
compatible = "adi,adgs1408";
reg = <0>;
spi-max-frequency = <1000000>;
#mux-control-cells = <0>;
};
}
adc-mux {
compatible = "io-channel-mux";
io-channels = <&adc 1>;
io-channel-names = "parent";
mux-controls = <&mux>;
channels = "out_a0", "out_a1", "test0", "test1",
"out_b0", "out_b1", "testb0", "testb1";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ADGS1408·1409 mux
1-2이 문서는 Analog Devices ADGS1408 8:1 mux와 ADGS1409 dual 4:1 mux 바인딩입니다.
Compatible과 standard mux binding
3-8필수 `compatible`은 `adi,adgs1408` 또는 `adi,adgs1409`입니다. Standard mux-controller 속성은 `mux-controller.yaml`을 따릅니다.
GPO range와 idle state
9-24선택 `gpio-controller`를 쓰면 `#gpio-cells = <2>`가 필수입니다. 첫 cell은 GPO line 번호로 ADGS1408에서는 0~3, ADGS1409에서는 0~4입니다. 두 번째 cell은 active-high 0 또는 active-low 1입니다.
선택 `idle-state`는 idle 시 mux controller state입니다. 기본은 `MUX_IDLE_AS_IS`이고 `MUX_IDLE_DISCONNECT`도 지원합니다.
State 0~7은 datasheet의 S1~S8에 대응하지만 ADGS1409에서는 state 0~3만 사용할 수 있습니다.
Device별 mux state와 GPO line 범위입니다.
GPIO specifier의 두 번째 cell 의미입니다.
SPI ADGS1408 ADC mux 예제
25-48예제는 SPI CS0의 ADGS1408을 1MHz로 구동하고 `#mux-control-cells = <0>`으로 controller 하나를 제공합니다. `idle-state`를 생략해 현재 state를 유지하고, ADC channel 1을 여덟 named output에 mux합니다.
/*
* One mux controller.
* Mux state set to idle as is (no idle-state declared)
*/
&spi0 {
mux: mux-controller@0 {
compatible = "adi,adgs1408";
reg = <0>;
spi-max-frequency = <1000000>;
#mux-control-cells = <0>;
};
}
adc-mux {
compatible = "io-channel-mux";
io-channels = <&adc 1>;
io-channel-names = "parent";
mux-controls = <&mux>;
channels = "out_a0", "out_a1", "test0", "test1",
"out_b0", "out_b1", "testb0", "testb1";
};
요약과 해설
adi,adgs1408.txt:1-48Device별 mux state와 ADC channel mapping을 설명합니다.