Skip to content

Commit f8a1ce3

Browse files
committed
x
1 parent 7f80024 commit f8a1ce3

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

dts/bindings/gpio/gpio-nexus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Common fields for GPIO nexus nodes
5+
#
6+
# see 2.5 Nexus Nodes and Specifier Mapping
7+
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
8+
# in the Devicetree Specification
59

610
properties:
711
gpio-map:

dts/bindings/iio/io-channel-nexus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Common fields for io-channel nexus
5+
#
6+
# see 2.5 Nexus Nodes and Specifier Mapping
7+
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
8+
# in the Devicetree Specification
59

610
properties:
711
io-channel-map:

dts/bindings/interrupt-controller/interrupt-nexus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Common fields for interrupt nexus nodes
5+
#
6+
# see 2.5 Nexus Nodes and Specifier Mapping
7+
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
8+
# in the Devicetree Specification
59

610
properties:
711
interrupt-map:

dts/bindings/pwm/pwm-nexus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Common fields for PWM nexus nodes
5+
#
6+
# see 2.5 Nexus Nodes and Specifier Mapping
7+
# https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#nexus-nodes-and-specifier-mapping
8+
# in the Devicetree Specification
59

610
properties:
711
pwm-map:

scripts/dts/python-devicetree/src/devicetree/edtlib.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,14 @@ class Node:
10461046
list is empty if the node does not hog any GPIOs. Only relevant for GPIO hog
10471047
nodes.
10481048
1049+
maps:
1050+
A list of ControllerAndData objects for each entry in a *-map property on
1051+
the node, such as 'interrupt-map'. Each ControllerAndData describes a
1052+
mapping from a child specifier to a parent controller, with 'basename' set
1053+
to the specifier name (e.g. 'interrupt') and 'data' containing the
1054+
parsed child and parent specifier cells.
1055+
The list is empty if the node has no *-map properties.
1056+
10491057
is_pci_device:
10501058
True if the node is a PCI device.
10511059
"""
@@ -1323,6 +1331,8 @@ def gpio_hogs(self) -> list[ControllerAndData]:
13231331

13241332
@property
13251333
def maps(self) -> list[ControllerAndData]:
1334+
"See the class docstring"
1335+
13261336
res: list[ControllerAndData] = []
13271337

13281338
def count_cells_num(node: dtlib_Node, specifier: str) -> int:
@@ -1332,9 +1342,6 @@ def count_cells_num(node: dtlib_Node, specifier: str) -> int:
13321342
add up the values of the address cells.
13331343
"""
13341344

1335-
if node is None:
1336-
_err("node is None.")
1337-
13381345
num = node.props[f"#{specifier}-cells"].to_num()
13391346

13401347
if specifier == "interrupt":

0 commit comments

Comments
 (0)