Lines Matching full:cap
62 int cap, ret; in tb_lc_reset_port() local
68 cap = find_port_lc_cap(port); in tb_lc_reset_port()
69 if (cap < 0) in tb_lc_reset_port()
70 return cap; in tb_lc_reset_port()
72 ret = tb_sw_read(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
78 ret = tb_sw_write(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
84 ret = tb_sw_read(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
90 return tb_sw_write(sw, &mode, TB_CFG_SWITCH, cap + TB_LC_PORT_MODE, 1); in tb_lc_reset_port()
98 int cap, ret; in tb_lc_set_port_configured() local
103 cap = find_port_lc_cap(port); in tb_lc_set_port_configured()
104 if (cap < 0) in tb_lc_set_port_configured()
105 return cap; in tb_lc_set_port_configured()
107 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
127 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_port_configured()
156 int cap, ret; in tb_lc_set_xdomain_configured() local
161 cap = find_port_lc_cap(port); in tb_lc_set_xdomain_configured()
162 if (cap < 0) in tb_lc_set_xdomain_configured()
163 return cap; in tb_lc_set_xdomain_configured()
165 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_xdomain_configured()
180 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_set_xdomain_configured()
219 int ret, cap; in tb_lc_start_lane_initialization() local
228 cap = find_port_lc_cap(port); in tb_lc_start_lane_initialization()
229 if (cap < 0) in tb_lc_start_lane_initialization()
230 return cap; in tb_lc_start_lane_initialization()
232 ret = tb_sw_read(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_start_lane_initialization()
238 return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, cap + TB_LC_SX_CTRL, 1); in tb_lc_start_lane_initialization()
251 int cap, ret; in tb_lc_is_clx_supported() local
254 cap = find_port_lc_cap(port); in tb_lc_is_clx_supported()
255 if (cap < 0) in tb_lc_is_clx_supported()
258 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_ATTR, 1); in tb_lc_is_clx_supported()
274 int cap, ret; in tb_lc_is_usb_plugged() local
280 cap = find_port_lc_cap(port); in tb_lc_is_usb_plugged()
281 if (cap < 0) in tb_lc_is_usb_plugged()
284 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_CS_42, 1); in tb_lc_is_usb_plugged()
300 int cap, ret; in tb_lc_is_xhci_connected() local
306 cap = find_port_lc_cap(port); in tb_lc_is_xhci_connected()
307 if (cap < 0) in tb_lc_is_xhci_connected()
310 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in tb_lc_is_xhci_connected()
320 int cap, ret; in __tb_lc_xhci_connect() local
326 cap = find_port_lc_cap(port); in __tb_lc_xhci_connect()
327 if (cap < 0) in __tb_lc_xhci_connect()
328 return cap; in __tb_lc_xhci_connect()
330 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in __tb_lc_xhci_connect()
339 return tb_sw_write(sw, &val, TB_CFG_SWITCH, cap + TB_LC_LINK_REQ, 1); in __tb_lc_xhci_connect()
498 int cap, ret; in tb_lc_lane_bonding_possible() local
505 cap = find_port_lc_cap(up); in tb_lc_lane_bonding_possible()
506 if (cap < 0) in tb_lc_lane_bonding_possible()
509 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, cap + TB_LC_PORT_ATTR, 1); in tb_lc_lane_bonding_possible()