.. | .. |
---|
11 | 11 | apply. In particular, "reg" and "spi-max-frequency" properties must be given. |
---|
12 | 12 | |
---|
13 | 13 | LED sub-node properties: |
---|
14 | | -- label : |
---|
| 14 | +- function : |
---|
15 | 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) |
---|
16 | 20 | - linux,default-trigger : (optional) |
---|
17 | 21 | see Documentation/devicetree/bindings/leds/common.txt |
---|
18 | 22 | |
---|
19 | 23 | Example |
---|
20 | 24 | ------- |
---|
| 25 | + |
---|
| 26 | +#include <dt-bindings/leds/common.h> |
---|
21 | 27 | |
---|
22 | 28 | led-controller@0 { |
---|
23 | 29 | compatible = "crane,cr0014114"; |
---|
.. | .. |
---|
28 | 34 | |
---|
29 | 35 | led@0 { |
---|
30 | 36 | reg = <0>; |
---|
31 | | - label = "red:coin"; |
---|
| 37 | + function = "coin"; |
---|
| 38 | + color = <LED_COLOR_ID_RED>; |
---|
32 | 39 | }; |
---|
33 | 40 | led@1 { |
---|
34 | 41 | reg = <1>; |
---|
35 | | - label = "green:coin"; |
---|
| 42 | + function = "coin"; |
---|
| 43 | + color = <LED_COLOR_ID_GREEN>; |
---|
36 | 44 | }; |
---|
37 | 45 | led@2 { |
---|
38 | 46 | reg = <2>; |
---|
39 | | - label = "blue:coin"; |
---|
| 47 | + function = "coin"; |
---|
| 48 | + color = <LED_COLOR_ID_BLUE>; |
---|
40 | 49 | }; |
---|
41 | 50 | led@3 { |
---|
42 | 51 | reg = <3>; |
---|
43 | | - label = "red:bill"; |
---|
| 52 | + function = "bill"; |
---|
| 53 | + color = <LED_COLOR_ID_RED>; |
---|
44 | 54 | }; |
---|
45 | 55 | led@4 { |
---|
46 | 56 | reg = <4>; |
---|
47 | | - label = "green:bill"; |
---|
| 57 | + function = "bill"; |
---|
| 58 | + color = <LED_COLOR_ID_GREEN>; |
---|
48 | 59 | }; |
---|
49 | 60 | led@5 { |
---|
50 | 61 | reg = <5>; |
---|
51 | | - label = "blue:bill"; |
---|
| 62 | + function = "bill"; |
---|
| 63 | + color = <LED_COLOR_ID_BLUE>; |
---|
52 | 64 | }; |
---|
53 | 65 | ... |
---|
54 | 66 | }; |
---|