• Home
  • Raw
  • Download

Lines Matching +full:power +full:- +full:manager

1 // SPDX-License-Identifier: GPL-2.0
26 fwnode = fwnode_find_reference(acpi_fwnode_handle(adev), "usb4-host-interface", 0); in tb_acpi_add_link()
31 if (dev_fwnode(&nhi->pdev->dev) != fwnode) in tb_acpi_add_link()
49 * SuperSpeed ports have this property and they are not power in tb_acpi_add_link()
54 dev = dev->parent; in tb_acpi_add_link()
65 if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI || in tb_acpi_add_link()
78 pm_runtime_get_sync(&pdev->dev); in tb_acpi_add_link()
80 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link()
85 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link()
86 dev_name(&pdev->dev)); in tb_acpi_add_link()
89 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link()
90 dev_name(&pdev->dev)); in tb_acpi_add_link()
93 pm_runtime_put(&pdev->dev); in tb_acpi_add_link()
102 * tb_acpi_add_links() - Add device links based on ACPI description
116 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links()
120 * Find all devices that have usb4-host-controller interface in tb_acpi_add_links()
126 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n"); in tb_acpi_add_links()
134 * tb_acpi_is_native() - Did the platform grant native TBT/USB4 control
137 * TBT/USB4. In this case software based connection manager can be used,
138 * otherwise there is firmware based connection manager running.
147 * tb_acpi_may_tunnel_usb3() - Is USB3 tunneling allowed by the platform
149 * When software based connection manager is used, this function
160 * tb_acpi_may_tunnel_dp() - Is DisplayPort tunneling allowed by the platform
162 * When software based connection manager is used, this function
173 * tb_acpi_may_tunnel_pcie() - Is PCIe tunneling allowed by the platform
175 * When software based connection manager is used, this function
186 * tb_acpi_is_xdomain_allowed() - Are XDomain connections allowed
188 * When software based connection manager is used, this function
198 /* UUID for retimer _DSM: e0053122-795b-4122-8a5e-57be1d26acb3 */
206 static int tb_acpi_retimer_set_power(struct tb_port *port, bool power) in tb_acpi_retimer_set_power() argument
208 struct usb4_port *usb4 = port->usb4; in tb_acpi_retimer_set_power()
214 if (!usb4->can_offline) in tb_acpi_retimer_set_power()
217 adev = ACPI_COMPANION(&usb4->dev); in tb_acpi_retimer_set_power()
222 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
227 return -EIO; in tb_acpi_retimer_set_power()
230 ret = obj->integer.value; in tb_acpi_retimer_set_power()
233 if (power == ret) in tb_acpi_retimer_set_power()
236 tb_port_dbg(port, "ACPI: calling _DSM to power %s retimers\n", in tb_acpi_retimer_set_power()
237 power ? "on" : "off"); in tb_acpi_retimer_set_power()
243 argv4[1].integer.value = power; in tb_acpi_retimer_set_power()
245 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
251 return -EIO; in tb_acpi_retimer_set_power()
254 ret = obj->integer.value; in tb_acpi_retimer_set_power()
258 if (power) in tb_acpi_retimer_set_power()
259 return ret == 1 ? 0 : -EBUSY; in tb_acpi_retimer_set_power()
264 return -EIO; in tb_acpi_retimer_set_power()
268 * tb_acpi_power_on_retimers() - Call platform to power on retimers
271 * Calls platform to turn on power to all retimers behind this USB4
274 * spec). Note if this returns %-EBUSY it means the type-C port is in
275 * non-USB4/TBT mode (there is non-USB4/TBT device connected).
287 * tb_acpi_power_off_retimers() - Call platform to power off retimers
318 port_adev = acpi_find_child_by_adr(ACPI_COMPANION(&parent_sw->dev), in tb_acpi_switch_find_companion()
319 port->port); in tb_acpi_switch_find_companion()
323 struct tb_nhi *nhi = sw->tb->nhi; in tb_acpi_switch_find_companion()
326 parent_adev = ACPI_COMPANION(&nhi->pdev->dev); in tb_acpi_switch_find_companion()
352 return acpi_find_child_by_adr(ACPI_COMPANION(dev->parent), in tb_acpi_find_companion()
353 tb_to_usb4_port_device(dev)->port->port); in tb_acpi_find_companion()
365 if (acpi_check_dsm(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_setup()
368 usb4->can_offline = true; in tb_acpi_setup()