0001 Bindings for fan connected to GPIO lines
0002
0003 Required properties:
0004 - compatible : "gpio-fan"
0005
0006 Optional properties:
0007 - gpios: Specifies the pins that map to bits in the control value,
0008 ordered MSB-->LSB.
0009 - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the
0010 control value that should be set to achieve them. This array
0011 must have the RPM values in ascending order.
0012 - alarm-gpios: This pin going active indicates something is wrong with
0013 the fan, and a udev event will be fired.
0014 - #cooling-cells: If used as a cooling device, must be <2>
0015 Also see:
0016 Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml
0017 min and max states are derived from the speed-map of the fan.
0018
0019 Note: At least one the "gpios" or "alarm-gpios" properties must be set.
0020
0021 Examples:
0022
0023 gpio_fan {
0024 compatible = "gpio-fan";
0025 gpios = <&gpio1 14 1
0026 &gpio1 13 1>;
0027 gpio-fan,speed-map = <0 0
0028 3000 1
0029 6000 2>;
0030 alarm-gpios = <&gpio1 15 1>;
0031 };
0032 gpio_fan_cool: gpio_fan {
0033 compatible = "gpio-fan";
0034 gpios = <&gpio2 14 1
0035 &gpio2 13 1>;
0036 gpio-fan,speed-map = <0 0>,
0037 <3000 1>,
0038 <6000 2>;
0039 alarm-gpios = <&gpio2 15 1>;
0040 #cooling-cells = <2>; /* min followed by max */
0041 };