1 Specifying PWM information for devices 2 ====================================== 3 4 1) PWM user nodes 5 ----------------- 6 7 PWM users should specify a list of PWM devices 8 with a property containing a 'pwm-list': 9 10 pwm-list ::= <single-pwm> [pwm-list] 11 single-pwm ::= <pwm-phandle> <pwm-spec 12 pwm-phandle : phandle to PWM controlle 13 pwm-specifier : array of #pwm-cells sp 14 (controller specific) 15 16 PWM properties should be named "pwms". The exa 17 property must be documented in the device tree 18 An optional property "pwm-names" may contain a 19 each of the PWM devices listed in the "pwms" p 20 property is given, the name of the user node w 21 22 Drivers for devices that use more than a singl 23 "pwm-names" property to map the name of the PW 24 pwm_get() call to an index into the list given 25 26 The following example could be used to describ 27 device: 28 29 pwm: pwm { 30 #pwm-cells = <2>; 31 }; 32 33 [...] 34 35 bl: backlight { 36 pwms = <&pwm 0 5000000>; 37 pwm-names = "backlight"; 38 }; 39 40 Note that in the example above, specifying the 41 because the name "backlight" would be used as 42 43 pwm-specifier typically encodes the chip-relat 44 period in nanoseconds. 45 46 Optionally, the pwm-specifier can encode a num 47 <dt-bindings/pwm/pwm.h>) in a third cell: 48 - PWM_POLARITY_INVERTED: invert the PWM signal 49 50 Example with optional PWM specifier for invers 51 52 bl: backlight { 53 pwms = <&pwm 0 5000000 PWM_POL 54 pwm-names = "backlight"; 55 }; 56 57 2) PWM controller nodes 58 ----------------------- 59 60 See pwm.yaml.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.