Lines Matching full:cap
65 int cap, ret; in tb_lc_reset_port() local
71 cap = find_port_lc_cap(port); in tb_lc_reset_port()
72 if (cap < 0) in tb_lc_reset_port()
73 return cap; in tb_lc_reset_port()
75 ret = tb_sw_read(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
81 ret = tb_sw_write(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
87 ret = tb_sw_read(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
93 return tb_sw_write(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
101 int cap, ret; in tb_lc_set_port_configured() local
106 cap = find_port_lc_cap(port); in tb_lc_set_port_configured()
107 if (cap < 0) in tb_lc_set_port_configured()
108 return cap; in tb_lc_set_port_configured()
110 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
130 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
163 int cap, ret; in tb_lc_set_xdomain_configured() local
168 cap = find_port_lc_cap(port); in tb_lc_set_xdomain_configured()
169 if (cap < 0) in tb_lc_set_xdomain_configured()
170 return cap; in tb_lc_set_xdomain_configured()
172 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_xdomain_configured()
187 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_xdomain_configured()
228 int ret, cap; in tb_lc_start_lane_initialization() local
237 cap = find_port_lc_cap(port); in tb_lc_start_lane_initialization()
238 if (cap < 0) in tb_lc_start_lane_initialization()
239 return cap; in tb_lc_start_lane_initialization()
241 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_start_lane_initialization()
247 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_start_lane_initialization()
262 int cap, ret; in tb_lc_is_clx_supported() local
265 cap = find_port_lc_cap(port); in tb_lc_is_clx_supported()
266 if (cap < 0) in tb_lc_is_clx_supported()
269 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_ATTR, 1); in tb_lc_is_clx_supported()
286 int cap, ret; in tb_lc_is_usb_plugged() local
292 cap = find_port_lc_cap(port); in tb_lc_is_usb_plugged()
293 if (cap < 0) in tb_lc_is_usb_plugged()
296 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_CS_42, 1); in tb_lc_is_usb_plugged()
313 int cap, ret; in tb_lc_is_xhci_connected() local
319 cap = find_port_lc_cap(port); in tb_lc_is_xhci_connected()
320 if (cap < 0) in tb_lc_is_xhci_connected()
323 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in tb_lc_is_xhci_connected()
333 int cap, ret; in __tb_lc_xhci_connect() local
339 cap = find_port_lc_cap(port); in __tb_lc_xhci_connect()
340 if (cap < 0) in __tb_lc_xhci_connect()
341 return cap; in __tb_lc_xhci_connect()
343 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in __tb_lc_xhci_connect()
352 return tb_sw_write(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in __tb_lc_xhci_connect()
518 int cap, ret; in tb_lc_lane_bonding_possible() local
525 cap = find_port_lc_cap(up); in tb_lc_lane_bonding_possible()
526 if (cap < 0) in tb_lc_lane_bonding_possible()
529 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_PORT_ATTR, 1); in tb_lc_lane_bonding_possible()