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