요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Some properties contain an ordered list of 1 or more datum which are
normally accessed by index. However, some devices will have multiple
values which are more naturally accessed by name. Device nodes can
include a supplemental property for assigning names to each of the list
items. The names property consists of a list of strings in the same
order as the data in the resource property.
The following supplemental names properties are defined.
Resource Property Supplemental Names Property
----------------- ---------------------------
reg reg-names
clocks clock-names
interrupts interrupt-names
Usage:
The -names property must be used in conjunction with the normal resource
property. If not it will be ignored.
Examples:
l4-abe {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x48000000 0x00001000>, /* MPU path */
<1 0 0x49000000 0x00001000>; /* L3 path */
mcasp {
compatible = "ti,mcasp";
reg = <0 0x10 0x10>, <0 0x20 0x10>,
<1 0x10 0x10>, <1 0x20 0x10>;
reg-names = "mpu", "dat",
"dma", "dma_dat";
interrupts = <11>, <12>;
interrupt-names = "rx", "tx";
};
timer {
compatible = "ti,timer";
reg = <0 0x40 0x10>, <1 0x40 0x10>;
reg-names = "mpu", "dma";
};
};
usb {
compatible = "ti,usb-host";
reg = <0x4a064000 0x800>, <0x4a064800 0x200>,
<0x4a064c00 0x200>;
reg-names = "config", "ohci", "ehci";
interrupts = <14>, <15>;
interrupt-names = "ohci", "ehci";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
resource 이름 속성
1-6일부 속성은 보통 인덱스로 접근하는 하나 이상의 datum을 순서 있는 목록으로 담습니다. 그러나 값이 여러 개인 장치에서는 이름으로 접근하는 편이 더 자연스러울 수 있습니다.
장치 노드는 목록의 각 항목에 이름을 부여하는 보조 속성을 포함할 수 있습니다. names 속성은 resource 속성의 데이터와 같은 순서로 문자열 목록을 담습니다.
resource와 names 대응
7-14정의된 보조 names 속성의 대응 관계는 다음과 같습니다.
| resource 속성 | 보조 names 속성 |
|---|---|
| reg | reg-names |
| clocks | clock-names |
| interrupts | interrupt-names |
사용 규칙
15-19`-names` 속성은 반드시 일반 resource 속성과 함께 사용해야 합니다. 대응하는 resource 속성이 없으면 무시됩니다.
버스·McASP·timer 예제
20-44첫 예제는 McASP의 네 register range를 `mpu`, `dat`, `dma`, `dma_dat`로 이름 붙이고 두 interrupt를 `rx`, `tx`로 구분합니다. timer의 두 register range는 `mpu`와 `dma`로 구분합니다.
l4-abe {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0 0x48000000 0x00001000>, /* MPU path */
<1 0 0x49000000 0x00001000>; /* L3 path */
mcasp {
compatible = "ti,mcasp";
reg = <0 0x10 0x10>, <0 0x20 0x10>,
<1 0x10 0x10>, <1 0x20 0x10>;
reg-names = "mpu", "dat",
"dma", "dma_dat";
interrupts = <11>, <12>;
interrupt-names = "rx", "tx";
};
timer {
compatible = "ti,timer";
reg = <0 0x40 0x10>, <1 0x40 0x10>;
reg-names = "mpu", "dma";
};
};
USB host 예제
45-54USB host는 세 register range를 `config`, `ohci`, `ehci`로, 두 interrupt를 `ohci`, `ehci`로 이름 붙입니다.
usb {
compatible = "ti,usb-host";
reg = <0x4a064000 0x800>, <0x4a064800 0x200>,
<0x4a064c00 0x200>;
reg-names = "config", "ohci", "ehci";
interrupts = <14>, <15>;
interrupt-names = "ohci", "ehci";
};
요약과 해설
resource-names.txt:1-54장치의 연결 방식과 필수·선택 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.