Lines Matching +full:non +full:- +full:negative
1 // SPDX-License-Identifier: GPL-2.0
87 return -EOPNOTSUPP; in usb4_native_switch_op()
112 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in __usb4_switch_op()
115 return -EINVAL; in __usb4_switch_op()
122 if (cm_ops->usb4_switch_op) { in __usb4_switch_op()
125 ret = cm_ops->usb4_switch_op(sw, opcode, metadata, status, in __usb4_switch_op()
128 if (ret != -EOPNOTSUPP) in __usb4_switch_op()
157 * usb4_switch_check_wakes() - Check for wakes and notify PM core about them
186 if (!port->cap_usb4) in usb4_switch_check_wakes()
190 port->cap_usb4 + PORT_CS_18, 1)) in usb4_switch_check_wakes()
201 usb4 = port->usb4; in usb4_switch_check_wakes()
202 if (device_may_wakeup(&usb4->dev) && wakeup_usb4) in usb4_switch_check_wakes()
203 pm_wakeup_event(&usb4->dev, 0); in usb4_switch_check_wakes()
209 pm_wakeup_event(&sw->dev, 0); in usb4_switch_check_wakes()
216 if (!port->cap_usb4) in link_is_usb4()
220 port->cap_usb4 + PORT_CS_18, 1)) in link_is_usb4()
227 * usb4_switch_setup() - Additional setup for USB4 device
256 sw->link_usb4 = link_is_usb4(down); in usb4_switch_setup()
257 tb_sw_dbg(sw, "link: %s\n", sw->link_usb4 ? "USB4" : "TBT"); in usb4_switch_setup()
269 if (tb_acpi_may_tunnel_usb3() && sw->link_usb4 && in usb4_switch_setup()
298 * usb4_switch_configuration_valid() - Set tunneling configuration to be valid
306 * Returns %0 in success and negative errno otherwise.
331 * usb4_switch_read_uid() - Read UID from USB4 router
335 * Reads 64-bit UID from USB4 router config space.
360 return status ? -EIO : 0; in usb4_switch_drom_read_block()
364 * usb4_switch_drom_read() - Read arbitrary bytes from USB4 router DROM
371 * should always work but for hosts it may return %-EOPNOTSUPP in which
382 * usb4_switch_lane_bonding_possible() - Are conditions met for lane bonding
395 ret = tb_port_read(up, &val, TB_CFG_PORT, up->cap_usb4 + PORT_CS_18, 1); in usb4_switch_lane_bonding_possible()
403 * usb4_switch_set_wake() - Enabled/disable wake
427 if (!port->cap_usb4) in usb4_switch_set_wake()
431 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
441 usb4 = port->usb4; in usb4_switch_set_wake()
444 device_may_wakeup(&usb4->dev)) && !configured) in usb4_switch_set_wake()
447 device_may_wakeup(&usb4->dev)) && configured) in usb4_switch_set_wake()
454 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
485 * usb4_switch_set_sleep() - Prepare the router to enter sleep
512 * usb4_switch_nvm_sector_size() - Return router NVM sector size
517 * %-EOPNOTSUPP.
531 return status == 0x2 ? -EOPNOTSUPP : -EIO; in usb4_switch_nvm_sector_size()
554 return status ? -EIO : 0; in usb4_switch_nvm_read_block()
558 * usb4_switch_nvm_read() - Read arbitrary bytes from router NVM
565 * %-EOPNOTSUPP.
575 * usb4_switch_nvm_set_offset() - Set NVM write offset
582 * Returns %0 in success and negative errno if there was a failure.
599 return status ? -EIO : 0; in usb4_switch_nvm_set_offset()
614 return status ? -EIO : 0; in usb4_switch_nvm_write_next_block()
618 * usb4_switch_nvm_write() - Write to the router NVM
625 * write is not supported returns %-EOPNOTSUPP.
641 * usb4_switch_nvm_authenticate() - Authenticate new NVM
647 * running. In case of failure returns negative errno.
663 case -EACCES: in usb4_switch_nvm_authenticate()
664 case -ENOTCONN: in usb4_switch_nvm_authenticate()
665 case -ETIMEDOUT: in usb4_switch_nvm_authenticate()
674 * usb4_switch_nvm_authenticate_status() - Read status of last NVM authenticate
680 * and the status code is placed in @status. Returns negative errno in case
687 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in usb4_switch_nvm_authenticate_status()
692 if (cm_ops->usb4_switch_nvm_authenticate_status) { in usb4_switch_nvm_authenticate_status()
693 ret = cm_ops->usb4_switch_nvm_authenticate_status(sw, status); in usb4_switch_nvm_authenticate_status()
694 if (ret != -EOPNOTSUPP) in usb4_switch_nvm_authenticate_status()
706 return -EBUSY; in usb4_switch_nvm_authenticate_status()
708 return -EOPNOTSUPP; in usb4_switch_nvm_authenticate_status()
720 * usb4_switch_credits_init() - Read buffer allocation parameters
724 * allocation fields accordingly. Specifically @sw->credits_allocation
727 * Returns %0 on success and negative errno otherwise.
744 return -EIO; in usb4_switch_credits_init()
748 return -EMSGSIZE; in usb4_switch_credits_init()
750 max_usb3 = -1; in usb4_switch_credits_init()
751 min_dp_aux = -1; in usb4_switch_credits_init()
752 min_dp_main = -1; in usb4_switch_credits_init()
753 max_pcie = -1; in usb4_switch_credits_init()
754 max_dma = -1; in usb4_switch_credits_init()
794 * issues, log a warning and fall back using the hard-coded in usb4_switch_credits_init()
842 sw->credit_allocation = true; in usb4_switch_credits_init()
844 sw->max_usb3_credits = max_usb3; in usb4_switch_credits_init()
846 sw->min_dp_aux_credits = min_dp_aux; in usb4_switch_credits_init()
848 sw->min_dp_main_credits = min_dp_main; in usb4_switch_credits_init()
850 sw->max_pcie_credits = max_pcie; in usb4_switch_credits_init()
852 sw->max_dma_credits = max_dma; in usb4_switch_credits_init()
857 return -EINVAL; in usb4_switch_credits_init()
861 * usb4_switch_query_dp_resource() - Query availability of DP IN resource
871 u32 metadata = in->port; in usb4_switch_query_dp_resource()
881 if (ret == -EOPNOTSUPP) in usb4_switch_query_dp_resource()
890 * usb4_switch_alloc_dp_resource() - Allocate DP IN resource
896 * returns negative errno, in particular %-EBUSY if the resource is
901 u32 metadata = in->port; in usb4_switch_alloc_dp_resource()
907 if (ret == -EOPNOTSUPP) in usb4_switch_alloc_dp_resource()
912 return status ? -EBUSY : 0; in usb4_switch_alloc_dp_resource()
916 * usb4_switch_dealloc_dp_resource() - Releases allocated DP IN resource
924 u32 metadata = in->port; in usb4_switch_dealloc_dp_resource()
930 if (ret == -EOPNOTSUPP) in usb4_switch_dealloc_dp_resource()
935 return status ? -EIO : 0; in usb4_switch_dealloc_dp_resource()
949 if (!p->link_nr) { in usb4_port_idx()
960 * usb4_switch_map_pcie_down() - Map USB4 port to a PCIe downstream adapter
991 * usb4_switch_map_usb3_down() - Map USB4 port to a USB3 downstream adapter
1022 * usb4_switch_add_ports() - Add USB4 ports for this router
1028 * Return %0 in case of success and negative errno in case of failure.
1042 if (!port->cap_usb4) in usb4_switch_add_ports()
1051 port->usb4 = usb4; in usb4_switch_add_ports()
1058 * usb4_switch_remove_ports() - Removes USB4 ports from this router
1068 if (port->usb4) { in usb4_switch_remove_ports()
1069 usb4_port_device_remove(port->usb4); in usb4_switch_remove_ports()
1070 port->usb4 = NULL; in usb4_switch_remove_ports()
1076 * usb4_port_unlock() - Unlock USB4 downstream port
1096 * usb4_port_hotplug_enable() - Enables hotplug for a port
1100 * to be used on lane, DP-IN, and DP-OUT adapters.
1116 * usb4_port_reset() - Issue downstream port reset
1126 if (!port->cap_usb4) in usb4_port_reset()
1127 return -EINVAL; in usb4_port_reset()
1130 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1137 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1144 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1151 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1159 if (!port->cap_usb4) in usb4_port_set_configured()
1160 return -EINVAL; in usb4_port_set_configured()
1163 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1173 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1177 * usb4_port_configure() - Set USB4 port configured
1188 * usb4_port_unconfigure() - Set USB4 port unconfigured
1203 if (!port->cap_usb4) in usb4_set_xdomain_configured()
1204 return -EINVAL; in usb4_set_xdomain_configured()
1207 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1217 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1221 * usb4_port_configure_xdomain() - Configure port for XDomain
1226 * the link type. Returns %0 in success and negative errno in failure.
1230 xd->link_usb4 = link_is_usb4(port); in usb4_port_configure_xdomain()
1235 * usb4_port_unconfigure_xdomain() - Unconfigure port for XDomain
1264 return -ETIMEDOUT; in usb4_port_wait_for_bit()
1270 return -EINVAL; in usb4_port_read_data()
1272 return tb_port_read(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_read_data()
1280 return -EINVAL; in usb4_port_write_data()
1282 return tb_port_write(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_write_data()
1287 * usb4_port_sb_read() - Read from sideband register
1296 * Returns %0 in case of success and negative errno in case of failure.
1305 if (!port->cap_usb4) in usb4_port_sb_read()
1306 return -EINVAL; in usb4_port_sb_read()
1316 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1320 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_read()
1326 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1331 return -ENODEV; in usb4_port_sb_read()
1333 return -EIO; in usb4_port_sb_read()
1339 * usb4_port_sb_write() - Write to sideband register
1348 * and negative errno in case of failure.
1357 if (!port->cap_usb4) in usb4_port_sb_write()
1358 return -EINVAL; in usb4_port_sb_write()
1375 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1379 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_write()
1385 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1390 return -ENODEV; in usb4_port_sb_write()
1392 return -EIO; in usb4_port_sb_write()
1403 return -EAGAIN; in usb4_port_sb_opcode_err_to_errno()
1405 return -EOPNOTSUPP; in usb4_port_sb_opcode_err_to_errno()
1407 return -EIO; in usb4_port_sb_opcode_err_to_errno()
1439 return -ETIMEDOUT; in usb4_port_sb_op()
1458 * usb4_port_router_offline() - Put the USB4 port to offline mode
1465 * Returns %0 in case of success and negative errno if there was an
1474 * usb4_port_router_online() - Put the USB4 port back to online
1485 * usb4_port_enumerate_retimers() - Send RT broadcast transaction
1490 * %0 in case of success and negative errno if there was an error.
1502 * usb4_port_clx_supported() - Check if CLx is supported by the link
1514 port->cap_usb4 + PORT_CS_18, 1); in usb4_port_clx_supported()
1522 * usb4_port_asym_supported() - If the port supports asymmetric link
1532 if (!port->cap_usb4) in usb4_port_asym_supported()
1535 if (tb_port_read(port, &val, TB_CFG_PORT, port->cap_usb4 + PORT_CS_18, 1)) in usb4_port_asym_supported()
1542 * usb4_port_asym_set_link_width() - Set link width to asymmetric or symmetric
1554 if (!port->cap_phy) in usb4_port_asym_set_link_width()
1555 return -EINVAL; in usb4_port_asym_set_link_width()
1558 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1577 return -EINVAL; in usb4_port_asym_set_link_width()
1581 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1585 * usb4_port_asym_start() - Start symmetry change and wait for completion
1592 * Returns %0 in case of success, %-ETIMEDOUT if case of timeout or
1593 * a negative errno in case of a failure.
1601 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1609 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1617 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_19, in usb4_port_asym_start()
1624 return usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_18, in usb4_port_asym_start()
1629 * usb4_port_margining_caps() - Read USB4 port marginig capabilities
1653 * usb4_port_hw_margin() - Run hardware lane margining on port
1672 return -EINVAL; in usb4_port_hw_margin()
1674 val = params->lanes; in usb4_port_hw_margin()
1675 if (params->time) in usb4_port_hw_margin()
1677 if (params->right_high || params->upper_eye) in usb4_port_hw_margin()
1679 if (params->ber_level) in usb4_port_hw_margin()
1680 val |= FIELD_PREP(USB4_MARGIN_HW_BER_MASK, params->ber_level); in usb4_port_hw_margin()
1681 if (params->optional_voltage_offset_range) in usb4_port_hw_margin()
1699 * usb4_port_sw_margin() - Run software lane margining on port
1708 * success and negative errno otherwise.
1718 return -EINVAL; in usb4_port_sw_margin()
1720 val = params->lanes; in usb4_port_sw_margin()
1721 if (params->time) in usb4_port_sw_margin()
1723 if (params->optional_voltage_offset_range) in usb4_port_sw_margin()
1725 if (params->right_high) in usb4_port_sw_margin()
1727 if (params->upper_eye) in usb4_port_sw_margin()
1729 val |= FIELD_PREP(USB4_MARGIN_SW_COUNTER_MASK, params->error_counter); in usb4_port_sw_margin()
1730 val |= FIELD_PREP(USB4_MARGIN_SW_VT_MASK, params->voltage_time_offset); in usb4_port_sw_margin()
1748 * usb4_port_sw_margin_errors() - Read the software margining error counters
1755 * Returns %0 in success and negative errno otherwise.
1780 * usb4_port_retimer_set_inbound_sbtx() - Enable sideband channel transactions
1794 if (ret != -ENODEV) in usb4_port_retimer_set_inbound_sbtx()
1807 * usb4_port_retimer_unset_inbound_sbtx() - Disable sideband channel transactions
1821 * usb4_port_retimer_is_last() - Is the retimer last on-board retimer
1826 * Type-C port) this function returns %1. If it is not returns %0. If
1827 * the retimer is not present returns %-ENODEV. Otherwise returns
1828 * negative errno.
1846 * usb4_port_retimer_is_cable() - Is the retimer cable retimer
1851 * %1 and %0 if it is on-board retimer. In case a retimer is not present
1852 * at @index returns %-ENODEV. Otherwise returns negative errno.
1870 * usb4_port_retimer_nvm_sector_size() - Read retimer NVM sector size
1876 * upgrade for example. Returns sector size in bytes or negative errno
1877 * in case of error. Specifically returns %-ENODEV if there is no
1896 * usb4_port_retimer_nvm_set_offset() - Set NVM write offset
1904 * Returns %0 in success and negative errno if there was a failure.
1935 struct tb_port *port = info->port; in usb4_port_retimer_nvm_write_next_block()
1936 u8 index = info->index; in usb4_port_retimer_nvm_write_next_block()
1949 * usb4_port_retimer_nvm_write() - Write to retimer NVM
1957 * upgrade. Returns %0 if the data was written successfully and negative
1958 * errno in case of failure. Specifically returns %-ENODEV if there is
1976 * usb4_port_retimer_nvm_authenticate() - Start retimer NVM upgrade
2001 * usb4_port_retimer_nvm_authenticate_status() - Read status of NVM upgrade
2011 * reading the status fails, returns negative errno.
2030 case -EAGAIN: in usb4_port_retimer_nvm_authenticate_status()
2049 struct tb_port *port = info->port; in usb4_port_retimer_nvm_read_block()
2050 u8 index = info->index; in usb4_port_retimer_nvm_read_block()
2072 * usb4_port_retimer_nvm_read() - Read contents of retimer NVM
2080 * read was successful and negative errno in case of failure.
2081 * Specifically returns %-ENODEV if there is no retimer at @index.
2096 if (port->max_bw) in usb4_usb3_port_max_bandwidth()
2097 return min(bw, port->max_bw); in usb4_usb3_port_max_bandwidth()
2102 * usb4_usb3_port_max_link_rate() - Maximum support USB3 link rate
2106 * Negative errno in case of error.
2114 return -EINVAL; in usb4_usb3_port_max_link_rate()
2117 port->cap_adap + ADP_USB3_CS_4, 1); in usb4_usb3_port_max_link_rate()
2133 return -EINVAL; in usb4_usb3_port_cm_request()
2134 if (tb_route(port->sw)) in usb4_usb3_port_cm_request()
2135 return -EINVAL; in usb4_usb3_port_cm_request()
2138 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2148 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2157 return usb4_port_wait_for_bit(port, port->cap_adap + ADP_USB3_CS_1, in usb4_usb3_port_cm_request()
2184 /* 1 uframe is 1/8 ms (125 us) -> 1 / 8000 s */ in mbps_to_usb3_bw()
2197 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_read_allocated_bandwidth()
2202 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_allocated_bandwidth()
2218 * usb4_usb3_port_allocated_bandwidth() - Bandwidth allocated for USB3
2224 * @downstream_bw in Mb/s. Returns %0 in case of success and negative
2251 port->cap_adap + ADP_USB3_CS_1, 1); in usb4_usb3_port_read_consumed_bandwidth()
2256 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_consumed_bandwidth()
2288 return -EINVAL; in usb4_usb3_port_write_allocated_bandwidth()
2291 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_write_allocated_bandwidth()
2301 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2310 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2314 * usb4_usb3_port_allocate_bandwidth() - Allocate bandwidth for USB3
2327 * Returns %0 in case of success and negative errno if there was a
2362 * usb4_usb3_port_release_bandwidth() - Release allocated USB3 bandwidth
2370 * Returns 0% in success and negative errno in case of failure.
2412 if (!tb_switch_is_usb4(port->sw)) in is_usb4_dpin()
2418 * usb4_dp_port_set_cm_id() - Assign CM ID to the DP IN adapter
2422 * Sets CM ID for the @port. Returns %0 on success and negative errno
2423 * otherwise. Speficially returns %-EOPNOTSUPP if the @port does not
2432 return -EOPNOTSUPP; in usb4_dp_port_set_cm_id()
2435 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2443 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2447 * usb4_dp_port_bandwidth_mode_supported() - Is the bandwidth allocation mode
2463 port->cap_adap + DP_LOCAL_CAP, 1); in usb4_dp_port_bandwidth_mode_supported()
2471 * usb4_dp_port_bandwidth_mode_enabled() - Is the bandwidth allocation mode
2487 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_bandwidth_mode_enabled()
2495 * usb4_dp_port_set_cm_bandwidth_mode_supported() - Set/clear CM support for
2501 * of the DP IN adapter. Returns %0 in success and negative errno
2502 * otherwise. Specifically returns %-OPNOTSUPP if the passed in adapter
2512 return -EOPNOTSUPP; in usb4_dp_port_set_cm_bandwidth_mode_supported()
2515 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2525 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2529 * usb4_dp_port_group_id() - Return Group ID assigned for the adapter
2534 * %-EOPNOTSUPP is returned.
2542 return -EOPNOTSUPP; in usb4_dp_port_group_id()
2545 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_group_id()
2553 * usb4_dp_port_set_group_id() - Set adapter Group ID
2558 * Returns %0 in case of success and negative errno otherwise.
2559 * Specifically returns %-EOPNOTSUPP if the adapter does not support
2568 return -EOPNOTSUPP; in usb4_dp_port_set_group_id()
2571 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2579 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2583 * usb4_dp_port_nrd() - Read non-reduced rate and lanes
2585 * @rate: Non-reduced rate in Mb/s is placed here
2586 * @lanes: Non-reduced lanes are placed here
2588 * Reads the non-reduced rate and lanes from the DP IN adapter. Returns
2589 * %0 in success and negative errno otherwise. Specifically returns
2590 * %-EOPNOTSUPP if the adapter does not support this.
2598 return -EOPNOTSUPP; in usb4_dp_port_nrd()
2601 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_nrd()
2638 * usb4_dp_port_set_nrd() - Set non-reduced rate and lanes
2640 * @rate: Non-reduced rate in Mb/s
2641 * @lanes: Non-reduced lanes
2644 * the non-reduced values for the DP IN adapter. Returns %0 in success
2645 * and negative errno otherwise. If the adapter does not support this
2646 * %-EOPNOTSUPP is returned.
2654 return -EOPNOTSUPP; in usb4_dp_port_set_nrd()
2657 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2679 return -EINVAL; in usb4_dp_port_set_nrd()
2694 return -EINVAL; in usb4_dp_port_set_nrd()
2698 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2702 * usb4_dp_port_granularity() - Return granularity for the bandwidth values
2706 * not support bandwidth allocation mode returns %-EOPNOTSUPP and negative
2715 return -EOPNOTSUPP; in usb4_dp_port_granularity()
2718 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_granularity()
2734 return -EINVAL; in usb4_dp_port_granularity()
2738 * usb4_dp_port_set_granularity() - Set granularity for the bandwidth values
2743 * bandwidth. Returns %0 in success and negative errno otherwise. If the
2744 * adapter does not support this %-EOPNOTSUPP is returned.
2752 return -EOPNOTSUPP; in usb4_dp_port_set_granularity()
2755 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2772 return -EINVAL; in usb4_dp_port_set_granularity()
2776 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2780 * usb4_dp_port_set_estimated_bandwidth() - Set estimated bandwidth
2787 * and negative errno otherwise. Specifically returns %-EOPNOTSUPP if
2796 return -EOPNOTSUPP; in usb4_dp_port_set_estimated_bandwidth()
2804 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2812 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2816 * usb4_dp_port_allocated_bandwidth() - Return allocated bandwidth
2820 * account the programmed granularity). Returns negative errno in case
2829 return -EOPNOTSUPP; in usb4_dp_port_allocated_bandwidth()
2837 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocated_bandwidth()
2853 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2863 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2885 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2897 return -ETIMEDOUT; in usb4_dp_port_wait_and_clear_cm_ack()
2901 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2907 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2911 * usb4_dp_port_allocate_bandwidth() - Set allocated bandwidth
2917 * success and negative errno in case of error.
2925 return -EOPNOTSUPP; in usb4_dp_port_allocate_bandwidth()
2933 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2941 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2953 * usb4_dp_port_requested_bandwidth() - Read requested bandwidth
2958 * error returns negative errno. Specifically returns %-EOPNOTSUPP if
2968 return -EOPNOTSUPP; in usb4_dp_port_requested_bandwidth()
2976 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_requested_bandwidth()
2981 return -ENODATA; in usb4_dp_port_requested_bandwidth()
2987 * usb4_pci_port_set_ext_encapsulation() - Enable/disable extended encapsulation
2993 * success and negative errno otherwise.
3001 return -EINVAL; in usb4_pci_port_set_ext_encapsulation()
3004 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()
3014 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()