Peter Ujfalusi | 08541cb | 2012-12-21 01:44:01 -0800 | [diff] [blame] | 1 | LED connected to PWM |
| 2 | |
| 3 | Required properties: |
| 4 | - compatible : should be "pwm-leds". |
| 5 | |
| 6 | Each LED is represented as a sub-node of the pwm-leds device. Each |
| 7 | node's name represents the name of the corresponding LED. |
| 8 | |
| 9 | LED sub-node properties: |
| 10 | - pwms : PWM property to point to the PWM device (phandle)/port (id) and to |
| 11 | specify the period time to be used: <&phandle id period_ns>; |
| 12 | - pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device |
| 13 | For the pwms and pwm-names property please refer to: |
| 14 | Documentation/devicetree/bindings/pwm/pwm.txt |
| 15 | - max-brightness : Maximum brightness possible for the LED |
| 16 | - label : (optional) |
| 17 | see Documentation/devicetree/bindings/leds/common.txt |
| 18 | - linux,default-trigger : (optional) |
| 19 | see Documentation/devicetree/bindings/leds/common.txt |
| 20 | |
| 21 | Example: |
| 22 | |
| 23 | twl_pwm: pwm { |
| 24 | /* provides two PWMs (id 0, 1 for PWM1 and PWM2) */ |
| 25 | compatible = "ti,twl6030-pwm"; |
| 26 | #pwm-cells = <2>; |
| 27 | }; |
| 28 | |
| 29 | twl_pwmled: pwmled { |
| 30 | /* provides one PWM (id 0 for Charing indicator LED) */ |
| 31 | compatible = "ti,twl6030-pwmled"; |
| 32 | #pwm-cells = <2>; |
| 33 | }; |
| 34 | |
| 35 | pwmleds { |
| 36 | compatible = "pwm-leds"; |
| 37 | kpad { |
| 38 | label = "omap4::keypad"; |
| 39 | pwms = <&twl_pwm 0 7812500>; |
| 40 | max-brightness = <127>; |
| 41 | }; |
| 42 | |
| 43 | charging { |
| 44 | label = "omap4:green:chrg"; |
| 45 | pwms = <&twl_pwmled 0 7812500>; |
| 46 | max-brightness = <255>; |
| 47 | }; |
| 48 | }; |