| /linux/drivers/thunderbolt/ |
| A D | switch.c | 862 if (prev->sw == end->sw) { in tb_next_port_on_path() 1760 if (sw && sw->authorized) { in disapprove_switch() 2434 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in tb_switch_alloc() 2462 sw->ports = kcalloc(sw->config.max_port_number + 1, sizeof(*sw->ports), in tb_switch_alloc() 2471 sw->ports[i].sw = sw; in tb_switch_alloc() 2536 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in tb_switch_alloc_safe_mode() 2732 sw->dma_port = dma_port_alloc(sw); in tb_switch_add_dma_port() 3274 tb_sw_dbg(sw, "uid: %#llx\n", sw->uid); in tb_switch_add() 3325 sw->vendor, sw->device); in tb_switch_add() 3326 if (sw->vendor_name && sw->device_name) in tb_switch_add() [all …]
|
| A D | eeprom.c | 146 res = tb_sw_read(sw, &cap, TB_CFG_SWITCH, sw->cap_plug_events, in tb_eeprom_get_drom_offset() 349 if (!sw->vendor && !sw->device) { in tb_drom_parse_entry_generic() 451 if (!sw->drom) in tb_drom_copy_efi() 506 tb_drom_read_uid_only(sw, &sw->uid); in tb_drom_copy_nvm() 529 ret = usb4_switch_drom_read(sw, 0, sw->drom, *size); in usb4_copy_drom() 559 ret = tb_eeprom_read_n(sw, 0, sw->drom, *size); in tb_drom_bit_bang() 584 if (!sw->uid) in tb_drom_parse_v1() 660 usb4_switch_read_uid(sw, &sw->uid); in tb_drom_host_read() 670 tb_drom_read_uid_only(sw, &sw->uid); in tb_drom_host_read() 682 usb4_switch_read_uid(sw, &sw->uid); in tb_drom_device_read() [all …]
|
| A D | tmu.c | 377 if (tb_route(sw)) { in tmu_mode_init() 395 sw->tmu.mode_request = sw->tmu.mode; in tmu_mode_init() 419 sw->tmu.cap = ret; in tb_switch_tmu_init() 452 if (!tb_route(sw)) in tb_switch_tmu_post_time() 565 if (tb_route(sw)) { in tb_switch_tmu_disable() 653 tb_switch_set_tmu_mode_params(sw, sw->tmu.mode); in tb_switch_tmu_off() 738 ret = tb_switch_set_tmu_mode_params(sw, sw->tmu.mode_request); in tb_switch_tmu_enable_unidirectional() 776 ret = tb_switch_set_tmu_mode_params(sw, sw->tmu.mode_request); in tb_switch_tmu_enable_enhanced() 843 tb_switch_set_tmu_mode_params(sw, sw->tmu.mode); in tb_switch_tmu_change_mode_prev() 895 ret = tb_switch_set_tmu_mode_params(sw, sw->tmu.mode_request); in tb_switch_tmu_change_mode() [all …]
|
| A D | lc.c | 20 if (!sw->cap_lc) in tb_lc_read_uuid() 27 if (!sw->cap_lc) in read_lc_desc() 34 struct tb_switch *sw = port->sw; in find_port_lc_cap() local 61 struct tb_switch *sw = port->sw; in tb_lc_reset_port() local 96 struct tb_switch *sw = port->sw; in tb_lc_set_port_configured() local 154 struct tb_switch *sw = port->sw; in tb_lc_set_xdomain_configured() local 218 struct tb_switch *sw = port->sw; in tb_lc_start_lane_initialization() local 250 struct tb_switch *sw = port->sw; in tb_lc_is_clx_supported() local 273 struct tb_switch *sw = port->sw; in tb_lc_is_usb_plugged() local 299 struct tb_switch *sw = port->sw; in tb_lc_is_xhci_connected() local [all …]
|
| A D | tb.h | 277 struct tb_switch *sw; member 560 return &sw->ports[sw->config.upstream_port_number]; in tb_upstream_port() 578 return ((u64) sw->config.route_hi) << 32 | sw->config.route_lo; in tb_route() 672 tb_route(sw), in tb_sw_read() 686 tb_route(sw), in tb_sw_write() 855 (p) <= &(sw)->ports[(sw)->config.max_port_number]; (p)++) 859 if (sw) in tb_switch_get() 861 return sw; in tb_switch_get() 897 return tb_port_at(tb_route(sw), tb_switch_parent(sw)); in tb_switch_downstream_port() 1039 sw->tmu.mode == sw->tmu.mode_request; in tb_switch_tmu_is_enabled() [all …]
|
| A D | quirks.c | 12 sw->quirks |= QUIRK_FORCE_POWER_LINK_CONTROLLER; in quirk_force_power_link() 18 if (sw->credit_allocation && sw->min_dp_main_credits == 56) { in quirk_dp_credit_allocation() 19 sw->min_dp_main_credits = 18; in quirk_dp_credit_allocation() 20 tb_sw_dbg(sw, "quirked DP main: %u\n", sw->min_dp_main_credits); in quirk_dp_credit_allocation() 26 sw->quirks |= QUIRK_NO_CLX; in quirk_clx_disable() 27 tb_sw_dbg(sw, "disabling CL states\n"); in quirk_clx_disable() 34 if (tb_switch_is_icm(sw)) in quirk_usb3_maximum_bandwidth() 37 tb_switch_for_each_port(sw, port) { in quirk_usb3_maximum_bandwidth() 57 void (*hook)(struct tb_switch *sw); 118 void tb_check_quirks(struct tb_switch *sw) in tb_check_quirks() argument [all …]
|
| A D | clx.c | 196 return tb_switch_is_usb4(sw) || tb_switch_is_titan_ridge(sw); in tb_switch_clx_is_supported() 213 if (tb_switch_is_icm(sw)) in tb_switch_clx_init() 216 if (!tb_route(sw)) in tb_switch_clx_init() 222 up = tb_upstream_port(sw); in tb_switch_clx_init() 233 sw->clx = clx; in tb_switch_clx_init() 242 if (!tb_route(sw)) in tb_switch_pm_secondary_resolve() 245 up = tb_upstream_port(sw); in tb_switch_pm_secondary_resolve() 264 if (!tb_route(sw)) in tb_switch_mask_clx_objections() 380 sw->clx |= clx; in tb_switch_clx_enable() 408 if (sw->is_unplugged) in tb_switch_clx_disable() [all …]
|
| A D | tb.c | 138 if (port->sw == sw) { in tb_remove_dp_resources() 187 sw = tb_switch_parent(sw); in tb_enable_clx() 238 sw = tb_switch_parent(sw); in tb_disable_clx() 509 sw = dst_port->sw; in tb_find_first_usb3_tunnel() 511 sw = src_port->sw; in tb_find_first_usb3_tunnel() 1027 sw = dst_port->sw; in tb_configure_asym() 1029 sw = src_port->sw; in tb_configure_asym() 1132 sw = dst_port->sw; in tb_configure_sym() 1134 sw = src_port->sw; in tb_configure_sym() 1300 sw = tb_switch_alloc(port->sw->tb, &port->sw->dev, in tb_scan_port() [all …]
|
| A D | icm.c | 442 *route = get_route(sw->route_hi, sw->route_lo); in icm_fr_get_route() 628 return sw; in alloc_switch() 753 if (sw) { in icm_fr_device_connected() 807 if (!sw) { in icm_fr_device_connected() 814 if (sw) { in icm_fr_device_connected() 885 if (!sw) { in icm_fr_device_disconnected() 970 if (sw) { in icm_fr_xdomain_connected() 1234 if (sw) { in __icm_tr_device_connected() 1249 if (sw) { in __icm_tr_device_connected() 1363 if (sw) { in icm_tr_xdomain_connected() [all …]
|
| A D | test.c | 43 sw = kunit_kzalloc(test, sizeof(*sw), GFP_KERNEL); in alloc_switch() 44 if (!sw) in alloc_switch() 60 sw->ports[i].sw = sw; in alloc_switch() 77 if (!sw) in alloc_host() 92 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_host() 99 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_host() 107 sw->ports[3].dual_link_port = &sw->ports[4]; in alloc_host() 114 sw->ports[4].dual_link_port = &sw->ports[3]; in alloc_host() 213 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_dev_default() 220 sw->ports[2].dual_link_port = &sw->ports[1]; in alloc_dev_default() [all …]
|
| A D | cap.c | 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() 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() 196 offset = tb_switch_next_cap(sw, offset); in tb_switch_find_cap() [all …]
|
| /linux/drivers/usb/roles/ |
| A D | class.c | 87 ret = sw->set(sw, role); in usb_role_switch_set_role() 110 if (IS_ERR_OR_NULL(sw) || !sw->registered) in usb_role_switch_get_role() 116 role = sw->get(sw); in usb_role_switch_get_role() 167 if (!sw) in usb_role_switch_get() 174 return sw; in usb_role_switch_get() 190 if (!sw) in fwnode_usb_role_switch_get() 196 return sw; in fwnode_usb_role_switch_get() 237 return sw; in usb_role_switch_find_by_fwnode() 367 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in usb_role_switch_register() 368 if (!sw) in usb_role_switch_register() [all …]
|
| /linux/drivers/platform/surface/ |
| A D | surface_aggregator_tabletsw.c | 73 const char *state = sw->ops.state_name(sw, &sw->state); in state_show() 94 status = sw->ops.get_state(sw, &state); in ssam_tablet_sw_update_workfn() 98 if (sw->state.source == state.source && sw->state.state == state.state) in ssam_tablet_sw_update_workfn() 100 sw->state = state; in ssam_tablet_sw_update_workfn() 103 tablet = sw->ops.state_is_tablet_mode(sw, &state); in ssam_tablet_sw_update_workfn() 129 sw = devm_kzalloc(&sdev->dev, sizeof(*sw), GFP_KERNEL); in ssam_tablet_sw_probe() 130 if (!sw) in ssam_tablet_sw_probe() 133 sw->sdev = sdev; in ssam_tablet_sw_probe() 144 status = sw->ops.get_state(sw, &sw->state); in ssam_tablet_sw_probe() 150 if (!sw->mode_switch) in ssam_tablet_sw_probe() [all …]
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| A D | prestera_router_hw.c | 86 INIT_LIST_HEAD(&sw->router->vr_list); in prestera_router_hw_init() 105 rhashtable_destroy(&sw->router->fib_ht); in prestera_router_hw_fini() 165 vr = __prestera_vr_find(sw, tb_id); in prestera_vr_get() 182 __prestera_vr_destroy(sw, vr); in prestera_vr_put() 242 prestera_vr_put(sw, e->vr); in prestera_rif_entry_destroy() 280 prestera_vr_put(sw, e->vr); in prestera_rif_entry_create() 409 nh_neigh = prestera_nh_neigh_get(sw, in __prestera_nexthop_group_create() 472 prestera_nh_neigh_put(sw, nh_neigh); in __prestera_nexthop_group_destroy() 599 prestera_vr_put(sw, vr); in __prestera_fib_node_destruct() 614 struct prestera_switch *sw = arg; in prestera_fib_node_destroy_ht_cb() local [all …]
|
| A D | prestera_router.c | 1261 sw); in prestera_k_arb_abort() 1264 sw); in prestera_k_arb_abort() 1395 struct prestera_switch *sw = fib_work->sw; in __prestera_router_fib_event_work() local 1458 fib_work->sw = router->sw; in __prestera_router_fib_event() 1479 struct prestera_switch *sw = net_work->sw; in prestera_router_neigh_event_work() local 1512 net_work->sw = router->sw; in prestera_router_netevent_event() 1557 sw->router = router; in prestera_router_init() 1558 router->sw = sw; in prestera_router_init() 1625 kfree(sw->router); in prestera_router_init() 1643 kfree(sw->router); in prestera_router_fini() [all …]
|
| A D | prestera_main.c | 371 struct prestera_switch *sw = port->sw; in prestera_port_sfp_bind() local 621 port->sw = sw; in prestera_port_create() 861 ret = of_get_mac_address(sw->np, sw->base_mac); in prestera_switch_set_base_mac_addr() 872 return id < sw->lag_max ? &sw->lags[id] : NULL; in prestera_lag_by_id() 944 struct prestera_switch *sw = port->sw; in prestera_lag_port_add() local 974 struct prestera_switch *sw = port->sw; in prestera_lag_port_del() local 1017 sw->lags = kcalloc(sw->lag_max, sizeof(*sw->lags), GFP_KERNEL); in prestera_lag_init() 1220 mdb_entry->sw = sw; in prestera_mdb_entry_create() 1254 domain->sw = sw; in prestera_flood_domain_create() 1365 sw->np = sw->dev->dev->of_node; in prestera_switch_init() [all …]
|
| A D | prestera_hw.h | 152 int prestera_hw_switch_init(struct prestera_switch *sw); 153 void prestera_hw_switch_fini(struct prestera_switch *sw); 216 int prestera_hw_vtcam_create(struct prestera_switch *sw, 223 int prestera_hw_vtcam_rule_del(struct prestera_switch *sw, 226 int prestera_hw_vtcam_iface_bind(struct prestera_switch *sw, 235 int prestera_hw_counter_abort(struct prestera_switch *sw); 239 int prestera_hw_counter_block_get(struct prestera_switch *sw, 255 int prestera_hw_rif_create(struct prestera_switch *sw, 273 int prestera_hw_nhgrp_blk_get(struct prestera_switch *sw, 290 int prestera_hw_rxtx_init(struct prestera_switch *sw, [all …]
|
| A D | prestera_span.c | 21 struct prestera_switch *sw; member 37 list_add_tail(&entry->list, &port->sw->span->entries); in prestera_span_entry_create() 78 struct prestera_switch *sw = port->sw; in prestera_span_get() local 95 prestera_hw_span_release(sw, new_span_id); in prestera_span_get() 115 err = prestera_hw_span_release(sw, span_id); in prestera_span_put() 127 struct prestera_switch *sw = binding->port->sw; in prestera_span_rule_add() local 141 prestera_span_put(sw, span_id); in prestera_span_rule_add() 169 int prestera_span_init(struct prestera_switch *sw) in prestera_span_init() argument 179 sw->span = span; in prestera_span_init() 180 span->sw = sw; in prestera_span_init() [all …]
|
| /linux/drivers/input/joystick/ |
| A D | sidewinder.c | 95 struct sw { struct 406 static int sw_read(struct sw *sw) in sw_read() argument 437 sw->ok++; in sw_read() 483 struct sw *sw = gameport_get_drvdata(gameport); in sw_poll() local 492 struct sw *sw = input_get_drvdata(dev); in sw_open() local 500 struct sw *sw = input_get_drvdata(dev); in sw_close() local 569 struct sw *sw; in sw_connect() local 580 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in sw_connect() 723 snprintf(sw->name, sizeof(sw->name), in sw_connect() 725 snprintf(sw->phys[i], sizeof(sw->phys[i]), in sw_connect() [all …]
|
| /linux/arch/mips/alchemy/common/ |
| A D | sleeper.S | 25 sw $1, PT_R1(sp) 26 sw $2, PT_R2(sp) 27 sw $3, PT_R3(sp) 28 sw $4, PT_R4(sp) 29 sw $5, PT_R5(sp) 30 sw $6, PT_R6(sp) 31 sw $7, PT_R7(sp) 46 sw k0, 0x20(sp) 48 sw k0, 0x1c(sp) 50 sw k0, 0x18(sp) [all …]
|
| /linux/drivers/input/misc/ |
| A D | ad714x.c | 317 sw->flt_pos = (sw->flt_pos * (10 - 4) + in ad714x_slider_cal_flt_pos() 367 sw->flt_pos = sw->abs_pos; in ad714x_slider_state_machine() 412 sw->pre_highest_stage = sw->highest_stage; in ad714x_wheel_cal_highest_stage() 488 sw->flt_pos = sw->abs_pos; in ad714x_wheel_cal_flt_pos() 490 sw->flt_pos = ((sw->flt_pos * 30) + (sw->abs_pos * 71)) / 100; in ad714x_wheel_cal_flt_pos() 539 sw->flt_pos = sw->abs_pos; in ad714x_wheel_state_machine() 665 sw->x_abs_pos, sw->y_abs_pos); in touchpad_cal_abs_pos() 678 idx, sw->x_flt_pos, sw->y_flt_pos); in touchpad_cal_flt_pos() 773 return sw->left_ep || sw->right_ep || sw->top_ep || sw->bottom_ep; in touchpad_check_endpoint() 828 sw->x_flt_pos = sw->x_abs_pos; in ad714x_touchpad_state_machine() [all …]
|
| /linux/arch/alpha/include/uapi/asm/ |
| A D | fpu.h | 93 ieee_swcr_to_fpcr(unsigned long sw) in ieee_swcr_to_fpcr() argument 96 fp = (sw & IEEE_STATUS_MASK) << 35; in ieee_swcr_to_fpcr() 97 fp |= (sw & IEEE_MAP_DMZ) << 36; in ieee_swcr_to_fpcr() 99 fp |= (~sw & (IEEE_TRAP_ENABLE_INV in ieee_swcr_to_fpcr() 104 fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41; in ieee_swcr_to_fpcr() 111 unsigned long sw; in ieee_fpcr_to_swcr() local 112 sw = (fp >> 35) & IEEE_STATUS_MASK; in ieee_fpcr_to_swcr() 113 sw |= (fp >> 36) & IEEE_MAP_DMZ; in ieee_fpcr_to_swcr() 114 sw |= (~fp >> 48) & (IEEE_TRAP_ENABLE_INV in ieee_fpcr_to_swcr() 118 sw |= (fp >> 47) & IEEE_MAP_UMZ; in ieee_fpcr_to_swcr() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/sw/ |
| A D | base.c | 36 spin_lock_irqsave(&sw->engine.lock, flags); in nvkm_sw_mthd() 37 list_for_each_entry(chan, &sw->chan, head) { in nvkm_sw_mthd() 41 list_add(&chan->head, &sw->chan); in nvkm_sw_mthd() 61 struct nvkm_sw *sw = nvkm_sw(oclass->engine); in nvkm_sw_oclass_get() local 64 while (sw->func->sclass[c].ctor) { in nvkm_sw_oclass_get() 66 oclass->engn = &sw->func->sclass[index]; in nvkm_sw_oclass_get() 81 return sw->func->chan_new(sw, fifoch, oclass, pobject); in nvkm_sw_cclass_get() 101 struct nvkm_sw *sw; in nvkm_sw_new_() local 103 if (!(sw = *psw = kzalloc(sizeof(*sw), GFP_KERNEL))) in nvkm_sw_new_() 105 INIT_LIST_HEAD(&sw->chan); in nvkm_sw_new_() [all …]
|
| /linux/arch/openrisc/kernel/ |
| A D | entry.S | 230 l.sw 0(reg),r0 428 l.sw PT_PC(r1),r5 441 l.bf sw 455 l.sw 0(r4),r5 465 l.sw 0(r4),r5 481 l.sw 0(r4),r5 497 l.sw 0(r4),r5 509 sw: 552 l.sw 0x0(r1),r3 1225 l.sw 0(r4),r27 [all …]
|
| /linux/include/linux/usb/ |
| A D | role.h | 16 typedef int (*usb_role_switch_set_t)(struct usb_role_switch *sw, 18 typedef enum usb_role (*usb_role_switch_get_t)(struct usb_role_switch *sw); 52 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role); 53 enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw); 56 void usb_role_switch_put(struct usb_role_switch *sw); 64 void usb_role_switch_unregister(struct usb_role_switch *sw); 66 void usb_role_switch_set_drvdata(struct usb_role_switch *sw, void *data); 67 void *usb_role_switch_get_drvdata(struct usb_role_switch *sw); 70 static inline int usb_role_switch_set_role(struct usb_role_switch *sw, in usb_role_switch_set_role() argument 92 static inline void usb_role_switch_put(struct usb_role_switch *sw) { } in usb_role_switch_put() argument [all …]
|