Lines Matching refs:dev
21 struct device *dev;
31 if (dev_fwnode(&nhi->pdev->dev) != fwnode)
40 dev = acpi_get_first_physical_node(adev);
41 if (dev)
53 while (dev && !dev_is_pci(dev))
54 dev = dev->parent;
56 if (!dev)
64 pdev = to_pci_dev(dev);
78 pm_runtime_get_sync(&pdev->dev);
80 link = device_link_add(&pdev->dev, &nhi->pdev->dev,
85 dev_dbg(&nhi->pdev->dev, "created link from %s\n",
86 dev_name(&pdev->dev));
89 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n",
90 dev_name(&pdev->dev));
93 pm_runtime_put(&pdev->dev);
116 if (!has_acpi_companion(&nhi->pdev->dev))
126 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n");
217 adev = ACPI_COMPANION(&usb4->dev);
300 static bool tb_acpi_bus_match(struct device *dev)
302 return tb_is_switch(dev) || tb_is_usb4_port_device(dev);
318 port_adev = acpi_find_child_by_adr(ACPI_COMPANION(&parent_sw->dev),
326 parent_adev = ACPI_COMPANION(&nhi->pdev->dev);
334 static struct acpi_device *tb_acpi_find_companion(struct device *dev)
349 if (tb_is_switch(dev))
350 return tb_acpi_switch_find_companion(tb_to_switch(dev));
351 if (tb_is_usb4_port_device(dev))
352 return acpi_find_child_by_adr(ACPI_COMPANION(dev->parent),
353 tb_to_usb4_port_device(dev)->port->port);
357 static void tb_acpi_setup(struct device *dev)
359 struct acpi_device *adev = ACPI_COMPANION(dev);
360 struct usb4_port *usb4 = tb_to_usb4_port_device(dev);