Skip to content
Permalink
Browse files

dts: edtlib: Shorten _init_{interrupts,gpios}() a bit

Also makes them consistent with _simple_phandle_val_list().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
  • Loading branch information...
ulfalizer authored and galak committed Aug 8, 2019
1 parent f7f0e0a commit 4985c214ef279493293f5243971efa007a51e7fe
Showing with 6 additions and 8 deletions.
  1. +6 −8 scripts/dts/edtlib.py
@@ -638,12 +638,11 @@ def _init_interrupts(self):
self.interrupts = []

for controller_node, spec in _interrupts(node):
controller = self.edt._node2dev[controller_node]

interrupt = Interrupt()
interrupt.dev = self
interrupt.controller = controller
interrupt.specifier = self._named_cells(controller, spec, "interrupt")
interrupt.controller = self.edt._node2dev[controller_node]
interrupt.specifier = self._named_cells(interrupt.controller, spec,
"interrupt")

self.interrupts.append(interrupt)

@@ -657,12 +656,11 @@ def _init_gpios(self):
for prefix, gpios in _gpios(self._node).items():
self.gpios[prefix] = []
for controller_node, spec in gpios:
controller = self.edt._node2dev[controller_node]

gpio = GPIO()
gpio.dev = self
gpio.controller = controller
gpio.specifier = self._named_cells(controller, spec, "GPIO")
gpio.controller = self.edt._node2dev[controller_node]
gpio.specifier = self._named_cells(gpio.controller, spec,
"GPIO")
gpio.name = prefix

self.gpios[prefix].append(gpio)

0 comments on commit 4985c21

Please sign in to comment.
You can’t perform that action at this time.