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/hwmon/pwm-fan.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 Bindings for a fan connected to the PWM lines
    2 
    3 Required properties:
    4 - compatible    : "pwm-fan"
    5 - pwms          : the PWM that is used to control the PWM fan
    6 - cooling-levels      : PWM duty cycle values in a range from 0 to 255
    7                         which correspond to thermal cooling states
    8 
    9 Optional properties:
   10 - fan-supply            : phandle to the regulator that provides power to the fan
   11 - interrupts            : This contains an interrupt specifier for each fan
   12                           tachometer output connected to an interrupt source.
   13                           The output signal must generate a defined number of
   14                           interrupts per fan revolution, which require that
   15                           it must be self resetting edge interrupts. See
   16                           interrupt-controller/interrupts.txt for the format.
   17 - pulses-per-revolution : define the number of pulses per fan revolution for
   18                           each tachometer input as an integer (default is 2
   19                           interrupts per revolution). The value must be
   20                           greater than zero.
   21 
   22 Example:
   23         fan0: pwm-fan {
   24                 compatible = "pwm-fan";
   25                 #cooling-cells = <2>;
   26                 pwms = <&pwm 0 10000 0>;
   27                 cooling-levels = <0 102 170 230>;
   28         };
   29 
   30         thermal-zones {
   31                 cpu_thermal: cpu-thermal {
   32                              thermal-sensors = <&tmu 0>;
   33                              polling-delay-passive = <0>;
   34                              polling-delay = <0>;
   35                              trips {
   36                                         cpu_alert1: cpu-alert1 {
   37                                                     temperature = <100000>; /* millicelsius */
   38                                                     hysteresis = <2000>; /* millicelsius */
   39                                                     type = "passive";
   40                                         };
   41                              };
   42                              cooling-maps {
   43                                         map0 {
   44                                                     trip = <&cpu_alert1>;
   45                                                     cooling-device = <&fan0 0 1>;
   46                                         };
   47                              };
   48                 };
   49 
   50 Example 2:
   51         fan0: pwm-fan {
   52                 compatible = "pwm-fan";
   53                 pwms = <&pwm 0 40000 0>;
   54                 fan-supply = <&reg_fan>;
   55                 interrupt-parent = <&gpio5>;
   56                 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
   57                 pulses-per-revolution = <2>;
   58         };
   59 
   60 Example 3:
   61         fan0: pwm-fan {
   62                 compatible = "pwm-fan";
   63                 pwms = <&pwm1 0 25000 0>;
   64                 interrupts-extended = <&gpio1 1 IRQ_TYPE_EDGE_FALLING>,
   65                         <&gpio2 5 IRQ_TYPE_EDGE_FALLING>;
   66                 pulses-per-revolution = <2>, <1>;
   67         };

Cache object: d5ec9a9e4545904b370f4f9092e325b9


[ 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.