Home
last modified time | relevance | path

Searched +full:sw +full:- +full:mode (Results 1 – 25 of 1003) sorted by relevance

12345678910>>...41

/linux/drivers/thunderbolt/
H A Dtmu.c1 // SPDX-License-Identifier: GPL-2.0
40 static const char *tmu_mode_name(enum tb_switch_tmu_mode mode) in tmu_mode_name() argument
42 switch (mode) { in tmu_mode_name()
46 return "uni-directional, LowRes"; in tmu_mode_name()
48 return "uni-directional, HiFi"; in tmu_mode_name()
50 return "bi-directional, HiFi"; in tmu_mode_name()
52 return "enhanced uni-directional, MedRes"; in tmu_mode_name()
58 static bool tb_switch_tmu_enhanced_is_supported(const struct tb_switch *sw) in tb_switch_tmu_enhanced_is_supported() argument
60 return usb4_switch_version(sw) > 1; in tb_switch_tmu_enhanced_is_supported()
63 static int tb_switch_set_tmu_mode_params(struct tb_switch *sw, in tb_switch_set_tmu_mode_params() argument
[all …]
H A Dtb.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Thunderbolt driver - bus logic (NHI independent)
12 #include <linux/nvmem-provider.h>
26 /* Need to keep power on while USB4 port is in redrive mode */
30 * struct tb_nvm - Structure holding NVM information
37 * @non_active: Non-active portion NVMem device
78 * enum tb_switch_tmu_mode - TMU mode
80 * @TB_SWITCH_TMU_MODE_LOWRES: Uni-directional, normal mode
81 * @TB_SWITCH_TMU_MODE_HIFI_UNI: Uni-directional, HiFi mode
82 * @TB_SWITCH_TMU_MODE_HIFI_BI: Bi-directional, HiFi mode
[all …]
H A Dlc.c1 // SPDX-License-Identifier: GPL-2.0
14 * tb_lc_read_uuid() - Read switch UUID from link controller common register
15 * @sw: Switch whose UUID is read
18 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid) in tb_lc_read_uuid() argument
20 if (!sw->cap_lc) in tb_lc_read_uuid()
21 return -EINVAL; in tb_lc_read_uuid()
22 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid()
25 static int read_lc_desc(struct tb_switch *sw, u32 *desc) in read_lc_desc() argument
27 if (!sw->cap_lc) in read_lc_desc()
28 return -EINVAL; in read_lc_desc()
[all …]
H A Dquirks.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt driver - quirks
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()
13 tb_sw_dbg(sw, "forcing power to link controller\n"); in quirk_force_power_link()
16 static void quirk_dp_credit_allocation(struct tb_switch *sw) in quirk_dp_credit_allocation() argument
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()
24 static void quirk_clx_disable(struct tb_switch *sw) in quirk_clx_disable() argument
[all …]
H A Dtb.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt driver - bus logic (NHI independent)
24 * direction. This is 40G - 10% guard band bandwidth.
47 * struct tb_cm - Simple Thunderbolt connection manager
68 return ((void *)tcm - sizeof(struct tb)); in tcm_to_tb()
89 ev->tb = tb; in tb_queue_hotplug()
90 ev->route = route; in tb_queue_hotplug()
91 ev->port = port; in tb_queue_hotplug()
92 ev->unplug = unplug; in tb_queue_hotplug()
93 INIT_WORK(&ev->work, tb_handle_hotplug); in tb_queue_hotplug()
[all …]
H A Dswitch.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt driver - switch/port utility functions
12 #include <linux/nvmem-provider.h>
37 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument
42 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status()
49 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument
54 st = __nvm_get_auth_status(sw); in nvm_get_auth_status()
57 *status = st ? st->status : 0; in nvm_get_auth_status()
60 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument
64 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status()
[all …]
H A Dusb4.c1 // SPDX-License-Identifier: GPL-2.0
53 static int usb4_native_switch_op(struct tb_switch *sw, u16 opcode, in usb4_native_switch_op() argument
62 ret = tb_sw_write(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_native_switch_op()
67 ret = tb_sw_write(sw, tx_data, TB_CFG_SWITCH, ROUTER_CS_9, in usb4_native_switch_op()
74 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, ROUTER_CS_26, 1); in usb4_native_switch_op()
78 ret = tb_switch_wait_for_bit(sw, ROUTER_CS_26, ROUTER_CS_26_OV, 0, 500); in usb4_native_switch_op()
82 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, ROUTER_CS_26, 1); in usb4_native_switch_op()
87 return -EOPNOTSUPP; in usb4_native_switch_op()
94 ret = tb_sw_read(sw, metadata, TB_CFG_SWITCH, ROUTER_CS_25, 1); in usb4_native_switch_op()
99 ret = tb_sw_read(sw, rx_data, TB_CFG_SWITCH, ROUTER_CS_9, in usb4_native_switch_op()
[all …]
H A Ddma_port.c1 // SPDX-License-Identifier: GPL-2.0
48 * struct tb_dma_port - DMA control port
49 * @sw: Switch the DMA port belongs to
55 struct tb_switch *sw; member
62 * When the switch is in safe mode it supports very little functionality
68 u64 route = tb_cfg_get_route(pkg->buffer) & ~BIT_ULL(63); in dma_port_match()
70 if (pkg->frame.eof == TB_CFG_PKG_ERROR) in dma_port_match()
72 if (pkg->frame.eof != req->response_type) in dma_port_match()
74 if (route != tb_cfg_get_route(req->request)) in dma_port_match()
76 if (pkg->frame.size != req->response_size) in dma_port_match()
[all …]
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_hw.h1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. */
140 (struct prestera_switch *sw, struct prestera_event *evt, void *arg);
152 int prestera_hw_switch_init(struct prestera_switch *sw);
153 void prestera_hw_switch_fini(struct prestera_switch *sw);
154 int prestera_hw_switch_ageing_set(struct prestera_switch *sw, u32 ageing_ms);
155 int prestera_hw_switch_mac_set(struct prestera_switch *sw, const char *mac);
162 u32 *mode, u32 *speed, u8 *duplex, u8 *fec);
164 bool admin, u32 mode, u8 inband,
170 bool admin, bool adv, u32 mode, u64 modes,
[all …]
H A Dprestera_hw.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */
254 __le32 mode; member
307 __le32 mode; member
315 __le32 mode; member
325 __le32 mode; member
656 u8 mode; member
810 static u8 prestera_hw_mdix_to_eth(u8 mode);
813 static int __prestera_cmd_ret(struct prestera_switch *sw, in __prestera_cmd_ret() argument
819 struct prestera_device *dev = sw->dev; in __prestera_cmd_ret()
[all …]
H A Dprestera_main.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */
87 prestera_hw_vlan_port_vid_set(port, port->pvid); in prestera_port_pvid_set()
89 port->pvid = vid; in prestera_port_pvid_set()
93 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw, in prestera_port_find_by_hwid() argument
98 read_lock(&sw->port_list_lock); in prestera_port_find_by_hwid()
99 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_port_find_by_hwid()
100 if (tmp->dev_id == dev_id && tmp->hw_id == hw_id) { in prestera_port_find_by_hwid()
105 read_unlock(&sw->port_list_lock); in prestera_port_find_by_hwid()
110 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id) in prestera_find_port() argument
[all …]
H A Dprestera.h1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. */
25 struct prestera_switch *sw; member
31 struct prestera_switch *sw; member
97 u32 mode; member
115 u32 mode; member
124 u32 mode; member
131 struct prestera_switch *sw; member
208 u32 mode; member
262 /* the interface is of lag type (lag-id) */
[all …]
H A Dprestera_switchdev.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */
30 struct prestera_switch *sw; member
97 prestera_bridge_find(const struct prestera_switch *sw, in prestera_bridge_find() argument
102 list_for_each_entry(bridge, &sw->swdev->bridge_list, head) in prestera_bridge_find()
103 if (bridge->dev == br_dev) in prestera_bridge_find()
115 list_for_each_entry(br_port, &bridge->port_list, head) in __prestera_bridge_port_find()
116 if (br_port->dev == brport_dev) in __prestera_bridge_port_find()
123 prestera_bridge_port_find(struct prestera_switch *sw, in prestera_bridge_port_find() argument
132 bridge = prestera_bridge_find(sw, br_dev); in prestera_bridge_port_find()
[all …]
/linux/drivers/input/joystick/
H A Dsidewinder.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 1998-2005 Vojtech Pavlik
93 } sw_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-
95 struct sw { struct
122 i = -id; /* Don't care about data, only want ID */ in sw_read_packet()
137 bitout--; in sw_read_packet()
147 timeout--; in sw_read_packet()
148 bitout--; /* Decrement timers */ in sw_read_packet()
149 sched--; in sw_read_packet()
154 if ((~u & v & 0x10) && (bitout > 0)) { /* Rising edge on clock - data bit */ in sw_read_packet()
[all …]
/linux/drivers/platform/surface/
H A Dsurface_aggregator_tabletsw.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Surface System Aggregator Module (SSAM) tablet mode switch driver.
19 /* -- SSAM generic tablet switch driver framework. -------------------------- */
29 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
30 const char *(*state_name)(struct ssam_tablet_sw *sw,
32 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
55 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
56 const char *(*state_name)(struct ssam_tablet_sw *sw,
58 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
72 struct ssam_tablet_sw *sw = dev_get_drvdata(dev); in state_show() local
[all …]
/linux/drivers/block/
H A Dswim3.c1 // SPDX-License-Identifier: GPL-2.0-or-later
24 #include <linux/blk-mq.h>
66 REG(mode);
182 int cur_cyl; /* cylinder head is on, or -1 */
193 int write_prot; /* 1 if write-protected, 0 if not, -1 dunno */
209 #define swim3_err(fmt, arg...) dev_err(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
210 #define swim3_warn(fmt, arg...) dev_warn(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
211 #define swim3_info(fmt, arg...) dev_info(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
214 #define swim3_dbg(fmt, arg...) dev_dbg(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
249 static int floppy_ioctl(struct block_device *bdev, blk_mode_t mode,
[all …]
/linux/arch/mips/alchemy/common/
H A Dsleeper.S1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Sleep helper for Au1xxx sleep mode.
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)
32 sw $16, PT_R16(sp)
[all …]
/linux/drivers/usb/typec/mux/
H A Dfsa4480.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2021-2022 Linaro Ltd.
4 * Copyright (C) 2018-2020 The Linux Foundation
57 struct typec_switch_dev *sw; member
63 unsigned long mode; member
74 /* Accesses only done under fsa4480->lock */
80 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set()
84 if (fsa->swap_sbu_lanes) in fsa4480_set()
87 /* USB Mode */ in fsa4480_set()
88 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set()
[all …]
H A Dit5205.c1 // SPDX-License-Identifier: GPL-2.0
3 * ITE IT5205 Type-C USB alternate mode passive mux
25 #define IT5205FN_CHIP_ID 0x35303235 /* "5025" -> "5205" */
65 struct typec_switch_dev *sw; member
69 static int it5205_switch_set(struct typec_switch_dev *sw, enum typec_orientation orientation) in it5205_switch_set() argument
71 struct it5205 *it = typec_switch_get_drvdata(sw); in it5205_switch_set()
75 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set()
79 regmap_update_bits(it->regmap, IT5205_REG_MUXCR, in it5205_switch_set()
85 regmap_write(it->regmap, IT5205_REG_MUXCR, 0); in it5205_switch_set()
97 if (state->mode >= TYPEC_STATE_MODAL && in it5205_mux_set()
[all …]
H A Dptn36502.c1 // SPDX-License-Identifier: GPL-2.0+
3 * NXP PTN36502 Type-C driver
11 #include <drm/bridge/aux-bridge.h>
66 struct typec_switch_dev *sw; member
72 struct mutex lock; /* protect non-concurrent retimer & switch */
75 unsigned long mode; member
81 bool reverse = (ptn->orientation == TYPEC_ORIENTATION_REVERSE); in ptn36502_set()
86 switch (ptn->mode) { in ptn36502_set()
89 regmap_write(ptn->regmap, PTN36502_MODE_CTRL1_REG, in ptn36502_set()
97 * A -> USB RX in ptn36502_set()
[all …]
H A Dnb7vpq904m.c1 // SPDX-License-Identifier: GPL-2.0+
3 * OnSemi NB7VPQ904M Type-C driver
14 #include <drm/bridge/aux-bridge.h>
67 struct typec_switch_dev *sw; member
74 struct mutex lock; /* protect non-concurrent retimer & switch */
77 unsigned long mode; member
97 regmap_update_bits(nb7->regmap, EQ_SETTING_REG(channel), in nb7vpq904m_set_channel()
99 regmap_update_bits(nb7->regmap, OUTPUT_COMPRESSION_AND_POL_REG(channel), in nb7vpq904m_set_channel()
101 regmap_update_bits(nb7->regmap, FLAT_GAIN_REG(channel), in nb7vpq904m_set_channel()
103 regmap_update_bits(nb7->regmap, LOSS_MATCH_REG(channel), in nb7vpq904m_set_channel()
[all …]
/linux/drivers/input/misc/
H A Dad714x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2009-2011 Analog Devices Inc.
132 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1); in ad714x_use_com_int()
134 ad714x->read(ad714x, STG_COM_INT_EN_REG, &data, 1); in ad714x_use_com_int()
136 ad714x->write(ad714x, STG_COM_INT_EN_REG, data); in ad714x_use_com_int()
138 ad714x->read(ad714x, STG_HIGH_INT_EN_REG, &data, 1); in ad714x_use_com_int()
140 ad714x->write(ad714x, STG_HIGH_INT_EN_REG, data); in ad714x_use_com_int()
149 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1); in ad714x_use_thr_int()
151 ad714x->read(ad714x, STG_COM_INT_EN_REG, &data, 1); in ad714x_use_thr_int()
153 ad714x->write(ad714x, STG_COM_INT_EN_REG, data); in ad714x_use_thr_int()
[all …]
/linux/tools/testing/selftests/drivers/net/bonding/
H A Dbond-lladdr-target.sh2 # SPDX-License-Identifier: GPL-2.0
7 # +----------------+
9 # | | | sw
11 # +---+-------+----+
13 # +---+-------+----+
17 # +----------------+
25 sw="sw-$(mktemp -u XXXXXX)"
26 host="ns-$(mktemp -u XXXXXX)"
30 ip netns del $sw
36 $@ | grep fe80 | grep -qv tentative
[all …]
/linux/drivers/net/wireless/intel/iwlwifi/fw/api/
H A Dphy.h1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2012-2014, 2019-2022, 2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
11 * enum iwl_phy_ops_subcmd_ids - PHY group commands
71 * struct iwl_dts_measurement_cmd - request DTS temp and/or voltage measurements
81 * enum iwl_dts_control_measurement_mode - DTS measurement type
82 * @DTS_AUTOMATIC: Automatic mode (full SW control). Provide temperature read
84 * SW DTS configuration.
88 * @DTS_OVER_WRITE: over-write the DTS temperatures in the SW until next read
[all …]
/linux/arch/alpha/kernel/
H A Dprocess.c1 // SPDX-License-Identifier: GPL-2.0
9 * This file handles the architecture-dependent parts of process handling.
71 int mode; member
87 ((unsigned long)hwrpb + hwrpb->processor_offset in common_shutdown_1()
88 + hwrpb->processor_size * cpuid); in common_shutdown_1()
89 pflags = &cpup->flags; in common_shutdown_1()
106 if (how->mode == LINUX_REBOOT_CMD_RESTART) { in common_shutdown_1()
107 if (!how->restart_cmd) { in common_shutdown_1()
136 /* If we've gotten here after SysRq-b, leave interrupt in common_shutdown_1()
142 do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1); in common_shutdown_1()
[all …]

12345678910>>...41