Lines Matching refs:sw
20 struct tb_switch *sw = port->sw; in tb_port_enable_tmu() local
28 if (tb_switch_is_light_ridge(sw)) in tb_port_enable_tmu()
30 else if (tb_switch_is_eagle_ridge(sw)) in tb_port_enable_tmu()
35 ret = tb_sw_read(sw, &value, TB_CFG_SWITCH, offset, 1); in tb_port_enable_tmu()
44 return tb_sw_write(sw, &value, TB_CFG_SWITCH, offset, 1); in tb_port_enable_tmu()
55 if (tb_switch_is_light_ridge(port->sw)) { in tb_port_dummy_read()
145 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset) in tb_switch_next_cap() argument
151 return sw->config.first_cap_offset; in tb_switch_next_cap()
153 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 2); in tb_switch_next_cap()
170 tb_sw_dbg(sw, "unknown capability %#x at %#x\n", in tb_switch_next_cap()
188 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap) in tb_switch_find_cap() argument
196 offset = tb_switch_next_cap(sw, offset); in tb_switch_find_cap()
200 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 1); in tb_switch_find_cap()
221 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec) in tb_switch_find_vse_cap() argument
229 offset = tb_switch_next_cap(sw, offset); in tb_switch_find_vse_cap()
233 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 1); in tb_switch_find_vse_cap()