Skip to content

Commit 4ec21ee

Browse files
okiasgroeck
authored andcommitted
dt-bindings: hwmon: gpio-fan: Convert txt bindings to yaml
Convert fan devices connected to GPIOs to the YAML syntax. Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20231209171653.85468-1-david@ixit.cz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 06f34bc commit 4ec21ee

2 files changed

Lines changed: 60 additions & 41 deletions

File tree

Documentation/devicetree/bindings/hwmon/gpio-fan.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/gpio-fan.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Fan connected to GPIO lines
8+
9+
maintainers:
10+
- Rob Herring <robh@kernel.org>
11+
12+
properties:
13+
compatible:
14+
const: gpio-fan
15+
16+
gpios:
17+
description: |
18+
Specifies the pins that map to bits in the control value,
19+
ordered MSB-->LSB.
20+
minItems: 1
21+
maxItems: 7
22+
23+
alarm-gpios:
24+
maxItems: 1
25+
26+
gpio-fan,speed-map:
27+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
28+
minItems: 2
29+
maxItems: 127
30+
items:
31+
items:
32+
- description: fan speed in RPMs
33+
- description: control value
34+
description: |
35+
A mapping of possible fan RPM speeds and the
36+
control value that should be set to achieve them. This array
37+
must have the RPM values in ascending order.
38+
39+
'#cooling-cells':
40+
const: 2
41+
42+
required:
43+
- compatible
44+
- gpios
45+
- gpio-fan,speed-map
46+
47+
additionalProperties: false
48+
49+
examples:
50+
- |
51+
gpio-fan {
52+
compatible = "gpio-fan";
53+
gpios = <&gpio2 14 1
54+
&gpio2 13 1>;
55+
gpio-fan,speed-map = < 0 0>,
56+
<3000 1>,
57+
<6000 2>;
58+
alarm-gpios = <&gpio2 15 1>;
59+
#cooling-cells = <2>; /* min followed by max */
60+
};

0 commit comments

Comments
 (0)