/linux-6.3-rc2/drivers/thunderbolt/ |
A D | tmu.c | 261 sw->tmu.has_ucap = tb_switch_tmu_ucap_supported(sw); in tb_switch_tmu_init() 294 if (!tb_route(sw)) in tb_switch_tmu_post_time() 464 tb_switch_set_tmu_mode_params(sw, sw->tmu.rate); in __tb_switch_tmu_off() 550 ret = tb_switch_set_tmu_mode_params(sw, sw->tmu.rate_request); in __tb_switch_tmu_enable_unidirectional() 594 tb_switch_tmu_rate_write(sw, sw->tmu.rate); in __tb_switch_tmu_change_mode_prev() 596 tb_switch_set_tmu_mode_params(sw, sw->tmu.rate); in __tb_switch_tmu_change_mode_prev() 615 ret = tb_switch_tmu_rate_write(sw, sw->tmu.rate_request); in __tb_switch_tmu_change_mode() 619 ret = tb_switch_set_tmu_mode_params(sw, sw->tmu.rate_request); in __tb_switch_tmu_change_mode() 669 if (tb_switch_tmu_is_enabled(sw, sw->tmu.unidirectional_request)) in tb_switch_tmu_enable() 719 ret = tb_switch_tmu_rate_write(sw, sw->tmu.rate_request); in tb_switch_tmu_enable() [all …]
|
A D | switch.c | 858 if (prev->sw == end->sw) { in tb_next_port_on_path() 1715 if (sw && sw->authorized) { in disapprove_switch() 2350 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in tb_switch_alloc() 2378 sw->ports = kcalloc(sw->config.max_port_number + 1, sizeof(*sw->ports), in tb_switch_alloc() 2387 sw->ports[i].sw = sw; in tb_switch_alloc() 2452 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in tb_switch_alloc_safe_mode() 2628 sw->dma_port = dma_port_alloc(sw); in tb_switch_add_dma_port() 2969 tb_sw_dbg(sw, "uid: %#llx\n", sw->uid); in tb_switch_add() 3014 sw->vendor, sw->device); in tb_switch_add() 3015 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() 496 if (!sw->drom) in tb_drom_copy_nvm() 507 tb_drom_read_uid_only(sw, &sw->uid); in tb_drom_copy_nvm() 530 ret = usb4_switch_drom_read(sw, 0, sw->drom, *size); in usb4_copy_host_drom() 560 if (!sw->uid) in tb_drom_parse() 608 if (sw->drom) in tb_drom_read() 628 usb4_switch_read_uid(sw, &sw->uid); in tb_drom_read() 637 tb_drom_read_uid_only(sw, &sw->uid); in tb_drom_read() [all …]
|
A D | lc.c | 18 if (!sw->cap_lc) in tb_lc_read_uuid() 20 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid() 25 if (!sw->cap_lc) in read_lc_desc() 32 struct tb_switch *sw = port->sw; in find_port_lc_cap() local 51 struct tb_switch *sw = port->sw; in tb_lc_set_port_configured() local 109 struct tb_switch *sw = port->sw; in tb_lc_set_xdomain_configured() local 173 struct tb_switch *sw = port->sw; in tb_lc_start_lane_initialization() local 205 struct tb_switch *sw = port->sw; in tb_lc_is_clx_supported() local 228 struct tb_switch *sw = port->sw; in tb_lc_is_usb_plugged() local 254 struct tb_switch *sw = port->sw; in tb_lc_is_xhci_connected() local [all …]
|
A D | tb.h | 276 struct tb_switch *sw; member 543 return &sw->ports[sw->config.upstream_port_number]; in tb_upstream_port() 561 return ((u64) sw->config.route_hi) << 32 | sw->config.route_lo; in tb_route() 639 tb_route(sw), in tb_sw_read() 653 tb_route(sw), in tb_sw_write() 703 #define tb_sw_dbg(sw, fmt, arg...) __TB_SW_PRINT(tb_dbg, sw, fmt, ##arg) argument 821 (p) <= &(sw)->ports[(sw)->config.max_port_number]; (p)++) 825 if (sw) in tb_switch_get() 827 return sw; in tb_switch_get() 984 return sw->tmu.rate == sw->tmu.rate_request && in tb_switch_tmu_is_enabled() [all …]
|
A D | tb.c | 111 if (tunnel->src_port->sw == in->sw && in tb_attach_bandwidth_group() 112 tunnel->dst_port->sw == out->sw) { in tb_attach_bandwidth_group() 210 if (port->sw == sw) { in tb_remove_dp_resources() 336 struct tb_switch *sw = port->sw; in tb_scan_xdomain() local 441 sw = dst_port->sw; in tb_find_first_usb3_tunnel() 443 sw = src_port->sw; in tb_find_first_usb3_tunnel() 699 ret = tb_tunnel_usb3(sw->tb, sw); in tb_create_usb3_tunnels() 774 sw = tb_switch_alloc(port->sw->tb, &port->sw->dev, in tb_scan_port() 814 sw->rpm = sw->generation > 1; in tb_scan_port() 1073 if (in->sw->config.depth < out->sw->config.depth) in tb_recalc_estimated_bandwidth_for_group() [all …]
|
A D | quirks.c | 10 static void quirk_force_power_link(struct tb_switch *sw) in quirk_force_power_link() argument 12 sw->quirks |= QUIRK_FORCE_POWER_LINK_CONTROLLER; in quirk_force_power_link() 15 static void quirk_dp_credit_allocation(struct tb_switch *sw) in quirk_dp_credit_allocation() argument 17 if (sw->credit_allocation && sw->min_dp_main_credits == 56) { in quirk_dp_credit_allocation() 18 sw->min_dp_main_credits = 18; in quirk_dp_credit_allocation() 19 tb_sw_dbg(sw, "quirked DP main: %u\n", sw->min_dp_main_credits); in quirk_dp_credit_allocation() 28 void (*hook)(struct tb_switch *sw); 48 void tb_check_quirks(struct tb_switch *sw) in tb_check_quirks() argument 59 if (q->vendor && q->vendor != sw->vendor) in tb_check_quirks() 61 if (q->device && q->device != sw->device) in tb_check_quirks() [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() 755 if (sw) { in icm_fr_device_connected() 810 if (!sw) { in icm_fr_device_connected() 817 if (sw) { in icm_fr_device_connected() 887 if (!sw) { in icm_fr_device_disconnected() 972 if (sw) { in icm_fr_xdomain_connected() 1236 if (sw) { in __icm_tr_device_connected() 1252 if (sw) { in __icm_tr_device_connected() 1365 if (sw) { in icm_tr_xdomain_connected() [all …]
|
A D | usb4.c | 167 if (tb_route(sw)) { in usb4_switch_check_wakes() 242 usb4_switch_check_wakes(sw); in usb4_switch_setup() 244 if (!tb_route(sw)) in usb4_switch_setup() 254 tb_sw_dbg(sw, "link: %s\n", sw->link_usb4 ? "USB4" : "TBT"); in usb4_switch_setup() 317 struct tb_switch *sw = data; in usb4_switch_drom_read_block() local 365 up = tb_upstream_port(sw); in usb4_switch_lane_bonding_possible() 384 u64 route = tb_route(sw); in usb4_switch_set_wake() 510 struct tb_switch *sw = data; in usb4_switch_nvm_read_block() local 576 struct tb_switch *sw = data; in usb4_switch_nvm_write_next_block() local 1005 if (tb_switch_is_icm(sw) || !tb_switch_is_usb4(sw)) in usb4_switch_add_ports() [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() 196 sw->ports[1].dual_link_port = &sw->ports[2]; in alloc_dev_default() 203 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-6.3-rc2/drivers/usb/roles/ |
A D | class.c | 51 ret = sw->set(sw, role); in usb_role_switch_set_role() 79 if (sw->get) in usb_role_switch_get_role() 80 role = sw->get(sw); in usb_role_switch_get_role() 131 if (!sw) in usb_role_switch_get() 138 return sw; in usb_role_switch_get() 154 if (!sw) in fwnode_usb_role_switch_get() 160 return sw; in fwnode_usb_role_switch_get() 292 kfree(sw); in usb_role_switch_release() 326 sw = kzalloc(sizeof(*sw), GFP_KERNEL); in usb_role_switch_register() 327 if (!sw) in usb_role_switch_register() [all …]
|
/linux-6.3-rc2/drivers/platform/surface/ |
A D | surface_aggregator_tabletsw.c | 64 const char *state = sw->ops.state_name(sw, sw->state); in state_show() 85 status = sw->ops.get_state(sw, &state); in ssam_tablet_sw_update_workfn() 91 sw->state = state; in ssam_tablet_sw_update_workfn() 94 tablet = sw->ops.state_is_tablet_mode(sw, state); in ssam_tablet_sw_update_workfn() 120 sw = devm_kzalloc(&sdev->dev, sizeof(*sw), GFP_KERNEL); in ssam_tablet_sw_probe() 121 if (!sw) in ssam_tablet_sw_probe() 124 sw->sdev = sdev; in ssam_tablet_sw_probe() 135 status = sw->ops.get_state(sw, &sw->state); in ssam_tablet_sw_probe() 141 if (!sw->mode_switch) in ssam_tablet_sw_probe() 149 tablet = sw->ops.state_is_tablet_mode(sw, sw->state); in ssam_tablet_sw_probe() [all …]
|
/linux-6.3-rc2/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 | 377 struct prestera_switch *sw = port->sw; in prestera_port_sfp_bind() local 626 port->sw = sw; in prestera_port_create() 865 ret = of_get_mac_address(sw->np, sw->base_mac); in prestera_switch_set_base_mac_addr() 876 return id < sw->lag_max ? &sw->lags[id] : NULL; in prestera_lag_by_id() 948 struct prestera_switch *sw = port->sw; in prestera_lag_port_add() local 978 struct prestera_switch *sw = port->sw; in prestera_lag_port_del() local 1021 sw->lags = kcalloc(sw->lag_max, sizeof(*sw->lags), GFP_KERNEL); in prestera_lag_init() 1224 mdb_entry->sw = sw; in prestera_mdb_entry_create() 1258 domain->sw = sw; in prestera_flood_domain_create() 1369 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-6.3-rc2/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(struct 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-6.3-rc2/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-6.3-rc2/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-6.3-rc2/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-6.3-rc2/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() 82 return sw->func->chan_new(sw, fifoch, oclass, pobject); in nvkm_sw_cclass_get() 102 struct nvkm_sw *sw; in nvkm_sw_new_() local 104 if (!(sw = *psw = kzalloc(sizeof(*sw), GFP_KERNEL))) in nvkm_sw_new_() 106 INIT_LIST_HEAD(&sw->chan); in nvkm_sw_new_() [all …]
|
/linux-6.3-rc2/arch/openrisc/kernel/ |
A D | entry.S | 232 l.sw 0(reg),r0 430 l.sw PT_PC(r1),r5 443 l.bf sw 457 l.sw 0(r4),r5 467 l.sw 0(r4),r5 483 l.sw 0(r4),r5 499 l.sw 0(r4),r5 511 sw: 554 l.sw 0x0(r1),r3 1219 l.sw 0(r4),r27 [all …]
|
/linux-6.3-rc2/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 …]
|