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>
This commit is contained in:
committed by
Thierry Reding
parent
422470a826
commit
83af24027b
@@ -37,10 +37,21 @@ device:
|
||||
pwm-names = "backlight";
|
||||
};
|
||||
|
||||
Note that in the example above, specifying the "pwm-names" is redundant
|
||||
because the name "backlight" would be used as fallback anyway.
|
||||
|
||||
pwm-specifier typically encodes the chip-relative PWM number and the PWM
|
||||
period in nanoseconds. Note that in the example above, specifying the
|
||||
"pwm-names" is redundant because the name "backlight" would be used as
|
||||
fallback anyway.
|
||||
period in nanoseconds.
|
||||
|
||||
Optionally, the pwm-specifier can encode a number of flags in a third cell:
|
||||
- bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity)
|
||||
|
||||
Example with optional PWM specifier for inverse polarity
|
||||
|
||||
bl: backlight {
|
||||
pwms = <&pwm 0 5000000 1>;
|
||||
pwm-names = "backlight";
|
||||
};
|
||||
|
||||
2) PWM controller nodes
|
||||
-----------------------
|
||||
|
||||
Reference in New Issue
Block a user