Lines Matching refs:device
139 def is_controller(device): argument
140 return device.get("type") and "controller" in device.get("type")
163 def find_in_sysfs(device, parent_sysfs=None): argument
164 if parent_sysfs and device.get("path"):
166 parent_sysfs, device["meta"]["type"], str(device["path"])
176 if is_controller(device):
177 return find_controller_in_sysfs(device, sysfs_path)
207 def generate_pathname(device): argument
210 if device.get("path"):
211 pathname = str(device["path"])
213 if device.get("type"):
214 dev_type = device["type"]
215 if device.get("usb-version"):
216 dev_type = dev_type.replace("usb", "usb" + str(device["usb-version"]))
217 if device.get("acpi-uid") is not None:
218 dev_type = dev_type.replace("pci", "pci" + str(device["acpi-uid"]))
221 if device.get("dt-mmio"):
222 pathname += "@" + str(device["dt-mmio"])
224 if device.get("of-fullname-regex"):
225 pathname += "-" + str(device["of-fullname-regex"])
227 if device.get("name"):
228 pathname = pathname + "/" + device["name"]
276 def parse_node(device): argument
278 if device.get("devices"):
279 for child in device["devices"]:
282 if device.get("interfaces"):
283 test_count += len(device["interfaces"])