요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Single Byte SPI LED Device Driver.
The driver can be used for controllers with a very simple SPI protocol:
- one LED is controlled by a single byte on MOSI
- the value of the byte gives the brightness between two values (lowest to
highest)
- no return value is necessary (no MISO signal)
The value for lowest and highest brightness is dependent on the device and
therefore on the compatible string.
Depending on the compatible string some special functions (like hardware
accelerated blinking) might can be supported too.
The driver currently only supports one LED. The properties of the LED are
configured in a sub-node in the device node.
Required properties:
- compatible: should be one of
* "ubnt,acb-spi-led" microcontroller (SONiX 8F26E611LA) based device
used for example in Ubiquiti airCube ISP
Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply.
LED sub-node properties:
- label:
see Documentation/devicetree/bindings/leds/common.txt
- default-state:
see Documentation/devicetree/bindings/leds/common.txt
Only "on" and "off" are supported.
Example:
led-controller@0 {
compatible = "ubnt,acb-spi-led";
reg = <0>;
spi-max-frequency = <100000>;
led {
label = "white:status";
default-state = "on";
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
단일 바이트 SPI LED 프로토콜
1-17이 드라이버는 매우 단순한 SPI 프로토콜을 쓰는 controller용입니다. LED 하나를 MOSI의 단일 byte로 제어하고, 그 byte 값이 장치별 최저 밝기와 최고 밝기 사이의 밝기를 결정합니다. 반환 값은 필요하지 않으므로 MISO 신호도 필요하지 않습니다.
최저·최고 밝기 값은 장치와 `compatible` 문자열에 따라 달라집니다. 일부 `compatible`은 hardware-accelerated blinking 같은 특수 기능도 지원할 수 있습니다. 현재 드라이버는 LED 하나만 지원하며 LED 속성은 장치 노드의 하위 노드에 설정합니다.
MOSI의 한 byte가 장치별 밝기 범위로 변환되며 응답 경로는 없습니다.
Controller와 LED 하위 노드
18-32필수 `compatible` 값으로 현재 지원되는 것은 `ubnt,acb-spi-led`이며, Ubiquiti airCube ISP 등에 사용된 SONiX 8F26E611LA microcontroller 기반 장치를 가리킵니다. `Documentation/devicetree/bindings/spi/spi-bus.txt`의 SPI bus 속성 규칙도 적용됩니다.
LED 하위 노드의 `label`과 `default-state`는 `Documentation/devicetree/bindings/leds/common.txt`를 따릅니다. 이 드라이버에서 `default-state`는 `on`과 `off`만 지원합니다.
airCube status LED 예제
33-44예제는 chip-select 0에서 최대 SPI 주파수 100000Hz를 사용합니다. 단일 하위 LED의 label은 `white:status`이며 초기 상태는 `on`입니다.
led-controller@0 {
compatible = "ubnt,acb-spi-led";
reg = <0>;
spi-max-frequency = <100000>;
led {
label = "white:status";
default-state = "on";
};
};
요약과 해설
leds-spi-byte.txt:1-44응답 없는 단방향 SPI protocol과 airCube status LED 예제를 설명합니다.