Skip to content

Commit 56b01ac

Browse files
geertubrgl
authored andcommitted
dt-bindings: gpio: fairchild,74hc595: Convert to json-schema
Convert the Generic 8-bit shift register Device Tree binding documentation to json-schema. Rename from gpio-74x164 to fairchild,74hc595, as the former refers to the Linux driver, and not to a hardware name. Add the missing hog description. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
1 parent 5fe7067 commit 56b01ac

2 files changed

Lines changed: 77 additions & 27 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/fairchild,74hc595.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Generic 8-bit shift register
8+
9+
maintainers:
10+
- Maxime Ripard <mripard@kernel.org>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- fairchild,74hc595
16+
- nxp,74lvc594
17+
18+
reg:
19+
maxItems: 1
20+
21+
gpio-controller: true
22+
23+
'#gpio-cells':
24+
description:
25+
The second cell is only used to specify the GPIO polarity.
26+
const: 2
27+
28+
registers-number:
29+
description: Number of daisy-chained shift registers
30+
31+
enable-gpios:
32+
description: GPIO connected to the OE (Output Enable) pin.
33+
maxItems: 1
34+
35+
spi-max-frequency: true
36+
37+
patternProperties:
38+
"^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
39+
type: object
40+
41+
properties:
42+
gpio-hog: true
43+
gpios: true
44+
output-high: true
45+
output-low: true
46+
line-name: true
47+
48+
required:
49+
- gpio-hog
50+
- gpios
51+
52+
additionalProperties: false
53+
54+
required:
55+
- compatible
56+
- reg
57+
- gpio-controller
58+
- '#gpio-cells'
59+
- registers-number
60+
61+
additionalProperties: false
62+
63+
examples:
64+
- |
65+
spi {
66+
#address-cells = <1>;
67+
#size-cells = <0>;
68+
69+
gpio5: gpio5@0 {
70+
compatible = "fairchild,74hc595";
71+
reg = <0>;
72+
gpio-controller;
73+
#gpio-cells = <2>;
74+
registers-number = <4>;
75+
spi-max-frequency = <100000>;
76+
};
77+
};

Documentation/devicetree/bindings/gpio/gpio-74x164.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)