The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/pwm/pwm.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 that they want to use
    8 with a property containing a 'pwm-list':
    9 
   10         pwm-list ::= <single-pwm> [pwm-list]
   11         single-pwm ::= <pwm-phandle> <pwm-specifier>
   12         pwm-phandle : phandle to PWM controller node
   13         pwm-specifier : array of #pwm-cells specifying the given PWM
   14                         (controller specific)
   15 
   16 PWM properties should be named "pwms". The exact meaning of each pwms
   17 property must be documented in the device tree binding for each device.
   18 An optional property "pwm-names" may contain a list of strings to label
   19 each of the PWM devices listed in the "pwms" property. If no "pwm-names"
   20 property is given, the name of the user node will be used as fallback.
   21 
   22 Drivers for devices that use more than a single PWM device can use the
   23 "pwm-names" property to map the name of the PWM device requested by the
   24 pwm_get() call to an index into the list given by the "pwms" property.
   25 
   26 The following example could be used to describe a PWM-based backlight
   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 "pwm-names" is redundant
   41 because the name "backlight" would be used as fallback anyway.
   42 
   43 pwm-specifier typically encodes the chip-relative PWM number and the PWM
   44 period in nanoseconds.
   45 
   46 Optionally, the pwm-specifier can encode a number of flags (defined in
   47 <dt-bindings/pwm/pwm.h>) in a third cell:
   48 - PWM_POLARITY_INVERTED: invert the PWM signal polarity
   49 
   50 Example with optional PWM specifier for inverse polarity
   51 
   52         bl: backlight {
   53                 pwms = <&pwm 0 5000000 PWM_POLARITY_INVERTED>;
   54                 pwm-names = "backlight";
   55         };
   56 
   57 2) PWM controller nodes
   58 -----------------------
   59 
   60 See pwm.yaml.

Cache object: 86cc00aa71e2a9488e6232f067384dee


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.