Home
last modified time | relevance | path

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

12345678910>>...42

/kernel/linux/linux-6.6/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)
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 …]
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)
23 * direction. This is 40G - 10% guard band bandwidth.
46 * struct tb_cm - Simple Thunderbolt connection manager
67 return ((void *)tcm - sizeof(struct tb)); in tcm_to_tb()
82 for (i = 0; i < ARRAY_SIZE(tcm->groups); i++) { in tb_init_bandwidth_groups()
83 struct tb_bandwidth_group *group = &tcm->groups[i]; in tb_init_bandwidth_groups()
85 group->tb = tcm_to_tb(tcm); in tb_init_bandwidth_groups()
86 group->index = i + 1; in tb_init_bandwidth_groups()
87 INIT_LIST_HEAD(&group->ports); in tb_init_bandwidth_groups()
[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 …]
/kernel/linux/linux-6.6/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
655 u8 mode; member
808 static u8 prestera_hw_mdix_to_eth(u8 mode);
811 static int __prestera_cmd_ret(struct prestera_switch *sw, in __prestera_cmd_ret() argument
817 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 …]
/kernel/linux/linux-5.10/drivers/thunderbolt/
Dtmu.c1 // SPDX-License-Identifier: GPL-2.0
14 static const char *tb_switch_tmu_mode_name(const struct tb_switch *sw) in tb_switch_tmu_mode_name() argument
16 bool root_switch = !tb_route(sw); in tb_switch_tmu_mode_name()
18 switch (sw->tmu.rate) { in tb_switch_tmu_mode_name()
26 if (sw->tmu.unidirectional) in tb_switch_tmu_mode_name()
27 return "uni-directional, HiFi"; in tb_switch_tmu_mode_name()
28 return "bi-directional, HiFi"; in tb_switch_tmu_mode_name()
33 return "uni-directional, normal"; in tb_switch_tmu_mode_name()
40 static bool tb_switch_tmu_ucap_supported(struct tb_switch *sw) in tb_switch_tmu_ucap_supported() argument
45 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_tmu_ucap_supported()
[all …]
Dswitch.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt driver - switch/port utility functions
11 #include <linux/nvmem-provider.h>
42 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument
47 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status()
54 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument
59 st = __nvm_get_auth_status(sw); in nvm_get_auth_status()
62 *status = st ? st->status : 0; in nvm_get_auth_status()
65 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument
69 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/prestera/
Dprestera_hw.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved */
323 static int __prestera_cmd_ret(struct prestera_switch *sw, in __prestera_cmd_ret() argument
329 struct prestera_device *dev = sw->dev; in __prestera_cmd_ret()
332 cmd->type = type; in __prestera_cmd_ret()
334 err = dev->send_req(dev, cmd, clen, ret, rlen, waitms); in __prestera_cmd_ret()
338 if (ret->cmd.type != PRESTERA_CMD_TYPE_ACK) in __prestera_cmd_ret()
339 return -EBADE; in __prestera_cmd_ret()
340 if (ret->status != PRESTERA_CMD_ACK_OK) in __prestera_cmd_ret()
341 return -EINVAL; in __prestera_cmd_ret()
[all …]
Dprestera_hw.h1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2019-2020 Marvell International Ltd. All rights reserved. */
100 (struct prestera_switch *sw, struct prestera_event *evt, void *arg);
105 int prestera_hw_switch_init(struct prestera_switch *sw);
106 void prestera_hw_switch_fini(struct prestera_switch *sw);
107 int prestera_hw_switch_ageing_set(struct prestera_switch *sw, u32 ageing_ms);
108 int prestera_hw_switch_mac_set(struct prestera_switch *sw, const char *mac);
134 int prestera_hw_port_link_mode_set(const struct prestera_port *port, u32 mode);
135 int prestera_hw_port_link_mode_get(const struct prestera_port *port, u32 *mode);
138 int prestera_hw_port_mdix_set(const struct prestera_port *port, u8 mode);
[all …]
/kernel/linux/linux-5.10/drivers/input/joystick/
Dsidewinder.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 1998-2005 Vojtech Pavlik
96 } sw_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-
98 struct sw { struct
125 i = -id; /* Don't care about data, only want ID */ in sw_read_packet()
140 bitout--; in sw_read_packet()
150 timeout--; in sw_read_packet()
151 bitout--; /* Decrement timers */ in sw_read_packet()
152 sched--; in sw_read_packet()
157 if ((~u & v & 0x10) && (bitout > 0)) { /* Rising edge on clock - data bit */ in sw_read_packet()
[all …]
/kernel/linux/linux-6.6/drivers/input/joystick/
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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/drivers/block/
Dswim3.c1 // SPDX-License-Identifier: GPL-2.0-or-later
24 #include <linux/blk-mq.h>
65 REG(mode);
181 int cur_cyl; /* cylinder head is on, or -1 */
192 int write_prot; /* 1 if write-protected, 0 if not, -1 dunno */
208 #define swim3_err(fmt, arg...) dev_err(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
209 #define swim3_warn(fmt, arg...) dev_warn(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
210 #define swim3_info(fmt, arg...) dev_info(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
213 #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, fmode_t mode,
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/drivers/usb/typec/
Dmux.c1 // SPDX-License-Identifier: GPL-2.0
3 * USB Type-C Multiplexer/DeMultiplexer Switch support
29 return strcmp(name + (name_len - suffix_len), suffix) == 0; in dev_name_ends_with()
34 return dev_fwnode(dev) == fwnode && dev_name_ends_with(dev, "-switch"); in switch_fwnode_match()
48 return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER); in typec_switch_match()
52 * fwnode_typec_switch_get - Find USB Type-C orientation switch
57 * ERR_PTR(-EPROBE_DEFER) when a connection was found but the switch
62 struct typec_switch *sw; in fwnode_typec_switch_get() local
64 sw = fwnode_connection_find_match(fwnode, "orientation-switch", NULL, in fwnode_typec_switch_get()
66 if (!IS_ERR_OR_NULL(sw)) in fwnode_typec_switch_get()
[all …]
/kernel/linux/linux-6.6/drivers/usb/typec/mux/
Dfsa4480.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2021-2022 Linaro Ltd.
4 * Copyright (C) 2018-2020 The Linux Foundation
53 struct typec_switch_dev *sw; member
59 unsigned long mode; member
69 /* Accesses only done under fsa4480->lock */
75 bool reverse = (fsa->orientation == TYPEC_ORIENTATION_REVERSE); in fsa4480_set()
79 /* USB Mode */ in fsa4480_set()
80 if (fsa->mode < TYPEC_STATE_MODAL || in fsa4480_set()
81 (!fsa->svid && (fsa->mode == TYPEC_MODE_USB2 || in fsa4480_set()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/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 …]

12345678910>>...42