Home
last modified time | relevance | path

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

12345678910>>...41

/linux-6.14.4/drivers/thunderbolt/
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 …]
Dtb.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Thunderbolt driver - bus logic (NHI independent)
13 #include <linux/nvmem-provider.h>
27 /* Need to keep power on while USB4 port is in redrive mode */
31 * struct tb_nvm - Structure holding NVM information
38 * @non_active: Non-active portion NVMem device
79 * enum tb_switch_tmu_mode - TMU mode
81 * @TB_SWITCH_TMU_MODE_LOWRES: Uni-directional, normal mode
82 * @TB_SWITCH_TMU_MODE_HIFI_UNI: Uni-directional, HiFi mode
83 * @TB_SWITCH_TMU_MODE_HIFI_BI: Bi-directional, HiFi mode
[all …]
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 …]
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 …]
Dtb.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt driver - bus logic (NHI independent)
30 * direction. This is 40G - 10% guard band bandwidth.
53 * struct tb_cm - Simple Thunderbolt connection manager
74 return ((void *)tcm - sizeof(struct tb)); in tcm_to_tb()
101 ev->tb = tb; in tb_queue_hotplug()
102 ev->route = route; in tb_queue_hotplug()
103 ev->port = port; in tb_queue_hotplug()
104 ev->unplug = unplug; in tb_queue_hotplug()
105 INIT_DELAYED_WORK(&ev->work, tb_handle_hotplug); in tb_queue_hotplug()
[all …]
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 …]
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 …]
/linux-6.14.4/drivers/net/ethernet/marvell/prestera/
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 …]
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 …]
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 …]
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 …]
/linux-6.14.4/drivers/input/joystick/
Dsidewinder.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 1998-2005 Vojtech Pavlik
94 } sw_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-
96 struct sw { struct
123 i = -id; /* Don't care about data, only want ID */ in sw_read_packet()
138 bitout--; in sw_read_packet()
148 timeout--; in sw_read_packet()
149 bitout--; /* Decrement timers */ in sw_read_packet()
150 sched--; in sw_read_packet()
155 if ((~u & v & 0x10) && (bitout > 0)) { /* Rising edge on clock - data bit */ in sw_read_packet()
[all …]
/linux-6.14.4/drivers/platform/surface/
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-6.14.4/drivers/usb/typec/mux/
Dtusb1046.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for the TUSB1046-DCI USB Type-C crosspoint switch
34 struct typec_switch_dev *sw; member
45 struct i2c_client *client = priv->client; in tusb1046_mux_set()
46 struct device *dev = &client->dev; in tusb1046_mux_set()
47 int mode, val, ret = 0; in tusb1046_mux_set() local
49 if (state->mode >= TYPEC_STATE_MODAL && in tusb1046_mux_set()
50 state->alt->svid != USB_TYPEC_DP_SID) in tusb1046_mux_set()
51 return -EINVAL; in tusb1046_mux_set()
53 dev_dbg(dev, "mux mode requested: %lu\n", state->mode); in tusb1046_mux_set()
[all …]
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 …]
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 …]
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 …]
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-6.14.4/arch/mips/alchemy/common/
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-6.14.4/drivers/block/
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-6.14.4/drivers/input/misc/
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-6.14.4/drivers/iio/frequency/
Dadmfm2000.c1 // SPDX-License-Identifier: GPL-2.0
23 #define ADMFM2000_MIN_GAIN -31000
24 #define ADMFM2000_DEFAULT_GAIN -0x20
35 static int admfm2000_mode(struct iio_dev *indio_dev, u32 chan, u32 mode) in admfm2000_mode() argument
40 switch (mode) { in admfm2000_mode()
43 gpiod_set_value_cansleep(st->sw1_ch[i], (chan == 0) ? 1 : 0); in admfm2000_mode()
44 gpiod_set_value_cansleep(st->sw2_ch[i], (chan == 0) ? 0 : 1); in admfm2000_mode()
49 gpiod_set_value_cansleep(st->sw1_ch[i], (chan == 0) ? 0 : 1); in admfm2000_mode()
50 gpiod_set_value_cansleep(st->sw2_ch[i], (chan == 0) ? 1 : 0); in admfm2000_mode()
54 return -EINVAL; in admfm2000_mode()
[all …]
/linux-6.14.4/tools/testing/selftests/drivers/net/bonding/
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-6.14.4/drivers/hid/intel-thc-hid/intel-thc/
Dintel-thc-hw.h1 /* SPDX-License-Identifier: GPL-2.0 */
26 /* THC SW sequencing Control */
28 /* THC SW sequencing Status */
30 /* THC SW Sequencing Data DW0 or SPI Address Register */
32 /* THC SW sequencing Data DW1 */
34 /* THC SW sequencing Data DW2 */
36 /* THC SW sequencing Data DW3 */
38 /* THC SW sequencing Data DW4 */
40 /* THC SW sequencing Data DW5 */
42 /* THC SW sequencing Data DW6 */
[all …]
/linux-6.14.4/drivers/net/wireless/intel/iwlwifi/fw/api/
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 …]

12345678910>>...41