gpio-fan.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Bindings for fan connected to GPIO lines
  2. Required properties:
  3. - compatible : "gpio-fan"
  4. Optional properties:
  5. - gpios: Specifies the pins that map to bits in the control value,
  6. ordered MSB-->LSB.
  7. - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the
  8. control value that should be set to achieve them. This array
  9. must have the RPM values in ascending order.
  10. - alarm-gpios: This pin going active indicates something is wrong with
  11. the fan, and a udev event will be fired.
  12. - cooling-cells: If used as a cooling device, must be <2>
  13. Also see: Documentation/devicetree/bindings/thermal/thermal.txt
  14. min and max states are derived from the speed-map of the fan.
  15. Note: At least one the "gpios" or "alarm-gpios" properties must be set.
  16. Examples:
  17. gpio_fan {
  18. compatible = "gpio-fan";
  19. gpios = <&gpio1 14 1
  20. &gpio1 13 1>;
  21. gpio-fan,speed-map = <0 0
  22. 3000 1
  23. 6000 2>;
  24. alarm-gpios = <&gpio1 15 1>;
  25. };
  26. gpio_fan_cool: gpio_fan {
  27. compatible = "gpio-fan";
  28. gpios = <&gpio2 14 1
  29. &gpio2 13 1>;
  30. gpio-fan,speed-map = <0 0>,
  31. <3000 1>,
  32. <6000 2>;
  33. alarm-gpios = <&gpio2 15 1>;
  34. #cooling-cells = <2>; /* min followed by max */
  35. };