Fan connected to GPIO lines
Schema identifier ($id): "http://devicetree.org/schemas/hwmon/gpio-fan.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Rob Herring <robh@kernel.org>"
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "gpio-fan"
gpios — required here #
Specifies the pins that map to bits in the control value, ordered MSB-->LSB.
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 7
alarm-gpios — not listed as required here #
Maximum number of items (maxItems): 1
fan-supply — not listed as required here #
Power supply for fan
gpio-fan,speed-map — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix
Minimum number of items (minItems): 2
Maximum number of items (maxItems): 127
Array item rules (items) #
Array item rules (
items)Item 1
fan speed in RPMs
Item 2
control value
A mapping of possible fan RPM speeds and the control value that should be set to achieve them. This array must have the RPM values in ascending order.
#cooling-cells — not listed as required here #
Exact value (const): 2
Required in this object (required): "compatible", "gpios", "gpio-fan,speed-map"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
gpio-fan {
compatible = "gpio-fan";
gpios = <&gpio2 14 1
&gpio2 13 1>;
gpio-fan,speed-map = < 0 0>,
<3000 1>,
<6000 2>;
alarm-gpios = <&gpio2 15 1>;
#cooling-cells = <2>; /* min followed by max */
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)