Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dtschema/dtb.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def fixup_phandles(validator, dt, path=''):


def fixup_gpios(dt):
if 'gpio-hog' in dt:
if 'gpio-hog' in dt or 'gpio-line' in dt:
return
for k, v in dt.items():
if isinstance(v, dict):
Expand Down
3 changes: 2 additions & 1 deletion dtschema/schemas/gpio/gpio-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ description: Schema for GPIO consumer devicetree bindings
maintainers:
- Rob Herring <robh@kernel.org>

# do not select this schema for GPIO hogs
# do not select this schema for GPIO hog/line child nodes
select:
properties:
gpio-hog: false
gpio-line: false

properties:
gpios:
Expand Down
3 changes: 3 additions & 0 deletions dtschema/schemas/gpio/gpio-hog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ properties:
line-name:
$ref: /schemas/types.yaml#/definitions/string

gpio-line-name:
$ref: /schemas/types.yaml#/definitions/string

output-high:
$ref: /schemas/types.yaml#/definitions/flag

Expand Down
48 changes: 48 additions & 0 deletions dtschema/schemas/gpio/gpio-line.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-License-Identifier: BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-line.yaml#
$schema: http://devicetree.org/meta-schemas/base.yaml#

title: GPIO Line Nodes

description: Schema for GPIO line initialization devicetree bindings

maintainers:
- Rob Herring <robh@kernel.org>

# select this schema for GPIO line setup nodes
select:
properties:
gpio-line: true

required:
- gpio-line

properties:
$nodename:
pattern: "-line(-[0-9]+)?$"

gpio-line:
$ref: /schemas/types.yaml#/definitions/flag

gpios:
$ref: /schemas/types.yaml#/definitions/uint32-matrix

input:
$ref: /schemas/types.yaml#/definitions/flag

output-high:
$ref: /schemas/types.yaml#/definitions/flag

output-low:
$ref: /schemas/types.yaml#/definitions/flag

gpio-line-name:
$ref: /schemas/types.yaml#/definitions/string

required:
- gpio-line
- gpios

additionalProperties: false