← Documents Documentation/devicetree/bindings/leds/leds-cr0014114.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Crane CR0014114 LED Driver

자판기용 CR0014114 SPI RGB LED board 바인딩입니다.

Source pathDocumentation/devicetree/bindings/leds/leds-cr0014114.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

leds-cr0014114.txt:1-66

Coin과 bill RGB channel 배치를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Crane Merchandising System - cr0014114 LED driver
2 -------------------------------------------------
3
4 This LED Board is widely used in vending machines produced
5 by Crane Merchandising Systems.
6
7 Required properties:
8 - compatible: "crane,cr0014114"
9
10 Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
11 apply. In particular, "reg" and "spi-max-frequency" properties must be given.
12
13 LED sub-node properties:
14 - function :
15 see Documentation/devicetree/bindings/leds/common.txt
16 - color :
17 see Documentation/devicetree/bindings/leds/common.txt
18 - label :
19 see Documentation/devicetree/bindings/leds/common.txt (deprecated)
20 - linux,default-trigger : (optional)
21 see Documentation/devicetree/bindings/leds/common.txt
22
23 Example
24 -------
25
26 #include <dt-bindings/leds/common.h>
27
28 led-controller@0 {
29 compatible = "crane,cr0014114";
30 reg = <0>;
31 spi-max-frequency = <50000>;
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 led@0 {
36 reg = <0>;
37 function = "coin";
38 color = <LED_COLOR_ID_RED>;
39 };
40 led@1 {
41 reg = <1>;
42 function = "coin";
43 color = <LED_COLOR_ID_GREEN>;
44 };
45 led@2 {
46 reg = <2>;
47 function = "coin";
48 color = <LED_COLOR_ID_BLUE>;
49 };
50 led@3 {
51 reg = <3>;
52 function = "bill";
53 color = <LED_COLOR_ID_RED>;
54 };
55 led@4 {
56 reg = <4>;
57 function = "bill";
58 color = <LED_COLOR_ID_GREEN>;
59 };
60 led@5 {
61 reg = <5>;
62 function = "bill";
63 color = <LED_COLOR_ID_BLUE>;
64 };
65 ...
66 };
67

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

CR0014114 LED board 속성

1-22

Crane Merchandising Systems의 CR0014114 LED board는 자판기에 널리 사용됩니다. 필수 `compatible`은 `crane,cr0014114`입니다. `Documentation/devicetree/bindings/spi/spi-bus.txt`의 규칙을 적용하므로 특히 `reg`와 `spi-max-frequency`를 반드시 지정해야 합니다.

LED 하위 node의 `function`과 `color`는 공통 LED 바인딩을 따릅니다. `label`도 같은 바인딩을 따르지만 deprecated입니다. 선택 `linux,default-trigger` 역시 공통 LED 바인딩에서 정의합니다.

CR0014114 LED 채널
SPI at 50000 HzCR0014114
LED 0/1/2Coin red/green/blue
LED 3/4/5Bill red/green/blue

SPI controller 아래의 channel별 하위 node가 동전 및 지폐 표시 RGB 출력을 구성합니다.

Coin과 bill RGB 예제

23-66

예제는 최대 SPI frequency 50000으로 controller를 구성합니다. Channel 0~2는 `coin` function의 red, green, blue이고 channel 3~5는 `bill` function의 red, green, blue입니다. 색상은 `dt-bindings/leds/common.h`의 `LED_COLOR_ID_*` 상수를 사용합니다.

#include <dt-bindings/leds/common.h>

led-controller@0 {
        compatible = "crane,cr0014114";
        reg = <0>;
        spi-max-frequency = <50000>;
        #address-cells = <1>;
        #size-cells = <0>;

        led@0 {
                reg = <0>;
                function = "coin";
                color = <LED_COLOR_ID_RED>;
        };
        led@1 {
                reg = <1>;
                function = "coin";
                color = <LED_COLOR_ID_GREEN>;
        };
        led@2 {
                reg = <2>;
                function = "coin";
                color = <LED_COLOR_ID_BLUE>;
        };
        led@3 {
                reg = <3>;
                function = "bill";
                color = <LED_COLOR_ID_RED>;
        };
        led@4 {
                reg = <4>;
                function = "bill";
                color = <LED_COLOR_ID_GREEN>;
        };
        led@5 {
                reg = <5>;
                function = "bill";
                color = <LED_COLOR_ID_BLUE>;
        };
        ...
};