diff options
author | Philip, Avinash <avinashphilip@ti.com> | 2012-11-21 02:40:44 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-11-22 16:47:12 -0500 |
commit | 83af24027b3df1af5c5a9aa9adcdcfeb3429d3be (patch) | |
tree | 3e104ed41554bb7e97378cc7cc3866c842306dff /Documentation/devicetree | |
parent | 422470a8265fbb1d182c00ab2421f4b416ab2dba (diff) |
pwm: Device tree support for PWM polarity
Add support for encoding PWM properties in bit encoded form with
of_pwm_xlate_with_flags() function support. Platforms require platform
specific PWM properties has to populate in 3rd cell of the pwm-specifier
and PWM driver should also set .of_xlate support with this function.
Currently PWM property polarity encoded in bit position 0 of the third
cell in pwm-specifier.
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/pwm/pwm.txt | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt index 73ec962bfe8c..06e67247859a 100644 --- a/Documentation/devicetree/bindings/pwm/pwm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm.txt | |||
@@ -37,10 +37,21 @@ device: | |||
37 | pwm-names = "backlight"; | 37 | pwm-names = "backlight"; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | Note that in the example above, specifying the "pwm-names" is redundant | ||
41 | because the name "backlight" would be used as fallback anyway. | ||
42 | |||
40 | pwm-specifier typically encodes the chip-relative PWM number and the PWM | 43 | pwm-specifier typically encodes the chip-relative PWM number and the PWM |
41 | period in nanoseconds. Note that in the example above, specifying the | 44 | period in nanoseconds. |
42 | "pwm-names" is redundant because the name "backlight" would be used as | 45 | |
43 | fallback anyway. | 46 | Optionally, the pwm-specifier can encode a number of flags in a third cell: |
47 | - bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity) | ||
48 | |||
49 | Example with optional PWM specifier for inverse polarity | ||
50 | |||
51 | bl: backlight { | ||
52 | pwms = <&pwm 0 5000000 1>; | ||
53 | pwm-names = "backlight"; | ||
54 | }; | ||
44 | 55 | ||
45 | 2) PWM controller nodes | 56 | 2) PWM controller nodes |
46 | ----------------------- | 57 | ----------------------- |