요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Generic hwlock bindings
=======================
Generic bindings that are common to all the hwlock platform specific driver
implementations.
Please also look through the individual platform specific hwlock binding
documentations for identifying any additional properties specific to that
platform.
hwlock providers:
=================
Required properties:
- #hwlock-cells: Specifies the number of cells needed to represent a
specific lock.
hwlock users:
=============
Consumers that require specific hwlock(s) should specify them using the
property "hwlocks", and an optional "hwlock-names" property.
Required properties:
- hwlocks: List of phandle to a hwlock provider node and an
associated hwlock args specifier as indicated by
#hwlock-cells. The list can have just a single hwlock
or multiple hwlocks, with each hwlock represented by
a phandle and a corresponding args specifier.
Optional properties:
- hwlock-names: List of hwlock name strings defined in the same order
as the hwlocks, with one name per hwlock. Consumers can
use the hwlock-names to match and get a specific hwlock.
1. Example of a node using a single specific hwlock:
The following example has a node requesting a hwlock in the bank defined by
the node hwlock1. hwlock1 is a hwlock provider with an argument specifier
of length 1.
node {
...
hwlocks = <&hwlock1 2>;
...
};
2. Example of a node using multiple specific hwlocks:
The following example has a node requesting two hwlocks, a hwlock within
the hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another
hwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2.
node {
...
hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
...
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Hwlock provider
1-17이 문서는 모든 platform-specific hwlock driver 구현에 공통인 generic binding입니다. Platform별 추가 속성은 개별 hwlock binding 문서를 함께 확인해야 합니다.
Hwlock provider의 필수 `#hwlock-cells`는 특정 lock을 나타내는 데 필요한 cell 수를 지정합니다.
Hwlock consumer
18-35특정 hwlock이 필요한 consumer는 `hwlocks` property와 선택 `hwlock-names`를 사용합니다. 필수 `hwlocks`는 hwlock provider node phandle과 `#hwlock-cells`가 정한 argument specifier의 목록입니다. Lock 하나 또는 여러 개를 담을 수 있고 각 lock은 phandle과 대응 argument로 표현합니다.
선택 `hwlock-names`는 `hwlocks`와 같은 순서로 lock마다 이름 string 하나를 제공합니다. Consumer는 이 이름으로 특정 hwlock을 match하고 가져올 수 있습니다.
Provider별 cell 수에 따라 단일 또는 복수 lock을 표현하는 방식을 정리합니다.
단일·복수 hwlock 예제
36-59첫 예제는 argument specifier 길이가 1인 provider `hwlock1`의 lock 2 하나를 요청합니다.
node {
...
hwlocks = <&hwlock1 2>;
...
};
두 번째 예제는 `#hwlock-cells = 1`인 `hwlock1`의 lock 2와 `#hwlock-cells = 2`인 `hwlock2`의 argument `0 3` lock을 함께 요청합니다.
node {
...
hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
...
};
요약과 해설
hwlock.txt:1-59hwlocks와 hwlock-names의 provider별 argument를 설명합니다.