Home
last modified time | relevance | path

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

12345678910>>...43

/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 …]
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 …]
/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-4.19/drivers/input/joystick/
Dsidewinder.c2 * Copyright (c) 1998-2005 Vojtech Pavlik
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
108 } sw_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-
110 struct sw { struct
137 i = -id; /* Don't care about data, only want ID */ in sw_read_packet()
152 bitout--; in sw_read_packet()
162 timeout--; in sw_read_packet()
163 bitout--; /* Decrement timers */ in sw_read_packet()
164 sched--; in sw_read_packet()
169 if ((~u & v & 0x10) && (bitout > 0)) { /* Rising edge on clock - data bit */ in sw_read_packet()
[all …]
/kernel/linux/linux-4.19/drivers/block/
Dswim3.c69 REG(mode);
185 int cur_cyl; /* cylinder head is on, or -1 */
196 int write_prot; /* 1 if write-protected, 0 if not, -1 dunno */
211 #define swim3_err(fmt, arg...) dev_err(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
212 #define swim3_warn(fmt, arg...) dev_warn(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
213 #define swim3_info(fmt, arg...) dev_info(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
216 #define swim3_dbg(fmt, arg...) dev_dbg(&fs->mdev->ofdev.dev, "[fd%d] " fmt, fs->index, arg)
252 static int floppy_ioctl(struct block_device *bdev, fmode_t mode,
254 static int floppy_open(struct block_device *bdev, fmode_t mode);
255 static void floppy_release(struct gendisk *disk, fmode_t mode);
[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-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-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-4.19/arch/mips/alchemy/common/
Dsleeper.S5 * Sleep helper for Au1xxx sleep mode.
29 sw $1, PT_R1(sp)
30 sw $2, PT_R2(sp)
31 sw $3, PT_R3(sp)
32 sw $4, PT_R4(sp)
33 sw $5, PT_R5(sp)
34 sw $6, PT_R6(sp)
35 sw $7, PT_R7(sp)
36 sw $16, PT_R16(sp)
37 sw $17, PT_R17(sp)
[all …]
/kernel/linux/linux-4.19/drivers/thunderbolt/
Dswitch.c1 // SPDX-License-Identifier: GPL-2.0
3 * Thunderbolt Cactus Ridge driver - switch/port utility functions
10 #include <linux/nvmem-provider.h>
45 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument
50 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status()
57 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument
62 st = __nvm_get_auth_status(sw); in nvm_get_auth_status()
65 *status = st ? st->status : 0; in nvm_get_auth_status()
68 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument
72 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status()
[all …]
Ddma_port.c51 * struct tb_dma_port - DMA control port
52 * @sw: Switch the DMA port belongs to
58 struct tb_switch *sw; member
65 * When the switch is in safe mode it supports very little functionality
71 u64 route = tb_cfg_get_route(pkg->buffer) & ~BIT_ULL(63); in dma_port_match()
73 if (pkg->frame.eof == TB_CFG_PKG_ERROR) in dma_port_match()
75 if (pkg->frame.eof != req->response_type) in dma_port_match()
77 if (route != tb_cfg_get_route(req->request)) in dma_port_match()
79 if (pkg->frame.size != req->response_size) in dma_port_match()
87 memcpy(req->response, pkg->buffer, req->response_size); in dma_port_copy()
[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-4.19/drivers/input/misc/
Dad714x.c4 * Copyright 2009-2011 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
133 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1); in ad714x_use_com_int()
135 ad714x->read(ad714x, STG_COM_INT_EN_REG, &data, 1); in ad714x_use_com_int()
137 ad714x->write(ad714x, STG_COM_INT_EN_REG, data); in ad714x_use_com_int()
139 ad714x->read(ad714x, STG_HIGH_INT_EN_REG, &data, 1); in ad714x_use_com_int()
141 ad714x->write(ad714x, STG_HIGH_INT_EN_REG, data); in ad714x_use_com_int()
150 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1); in ad714x_use_thr_int()
152 ad714x->read(ad714x, STG_COM_INT_EN_REG, &data, 1); in ad714x_use_thr_int()
154 ad714x->write(ad714x, STG_COM_INT_EN_REG, data); in ad714x_use_thr_int()
[all …]
/kernel/linux/linux-4.19/arch/alpha/kernel/
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 …]
/kernel/linux/linux-5.10/arch/alpha/kernel/
Dprocess.c1 // SPDX-License-Identifier: GPL-2.0
9 * This file handles the architecture-dependent parts of process handling.
70 int mode; member
86 ((unsigned long)hwrpb + hwrpb->processor_offset in common_shutdown_1()
87 + hwrpb->processor_size * cpuid); in common_shutdown_1()
88 pflags = &cpup->flags; in common_shutdown_1()
105 if (how->mode == LINUX_REBOOT_CMD_RESTART) { in common_shutdown_1()
106 if (!how->restart_cmd) { in common_shutdown_1()
135 /* If we've gotten here after SysRq-b, leave interrupt in common_shutdown_1()
141 do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1); in common_shutdown_1()
[all …]
/kernel/linux/linux-4.19/drivers/scsi/ufs/
Dufs_quirks.h2 * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
30 * ufs_dev_fix - ufs device quirk info
70 * only after respective SW command (which is generally too large).
73 * - As soon as SW sees the DL NAC error, it should schedule the error handler
74 * - Error handler would sleep for 50ms to see if there are any fatal errors
76 * - If there are fatal errors then SW does normal error recovery.
77 * - If there are no fatal errors then SW sends the NOP command to device
79 * - If NOP command times out, SW does normal error recovery
80 * - If NOP command succeed, skip the error handling.
106 * FAST AUTO mode, enable this quirk to make sure that FAST AUTO mode is
[all …]
/kernel/linux/linux-5.10/include/linux/usb/
Dtypec_mux.h1 // SPDX-License-Identifier: GPL-2.0
15 typedef int (*typec_switch_set_fn_t)(struct typec_switch *sw,
26 void typec_switch_put(struct typec_switch *sw);
27 int typec_switch_set(struct typec_switch *sw,
38 void typec_switch_unregister(struct typec_switch *sw);
40 void typec_switch_set_drvdata(struct typec_switch *sw, void *data);
41 void *typec_switch_get_drvdata(struct typec_switch *sw);
45 unsigned long mode; member
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_hw_ctl.h1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
15 * dpu_ctl_mode_sel: Interface mode selection
16 * DPU_CTL_MODE_SEL_VID: Video mode interface
17 * DPU_CTL_MODE_SEL_CMD: Command mode interface
26 * struct dpu_hw_stage_cfg - blending stage cfg
40 * @intf_mode_sel: Interface mode, cmd / vid
41 * @stream_sel: Stream selection for multi-stream interfaces
51 * struct dpu_hw_ctl_ops - Interface to the wb Hw driver functions
56 * kickoff hw operation for Sw controlled interfaces
[all …]
/kernel/linux/linux-4.19/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_hw_ctl.h1 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
23 * dpu_ctl_mode_sel: Interface mode selection
24 * DPU_CTL_MODE_SEL_VID: Video mode interface
25 * DPU_CTL_MODE_SEL_CMD: Command mode interface
34 * struct dpu_hw_stage_cfg - blending stage cfg
48 * @intf_mode_sel: Interface mode, cmd / vid
49 * @stream_sel: Stream selection for multi-stream interfaces
59 * struct dpu_hw_ctl_ops - Interface to the wb Hw driver functions
64 * kickoff hw operation for Sw controlled interfaces
65 * DSI cmd mode and WB interface are SW controlled
[all …]
/kernel/linux/linux-4.19/drivers/usb/roles/
Dclass.c1 // SPDX-License-Identifier: GPL-2.0
35 * usb_role_switch_set_role - Set USB role for a switch
36 * @sw: USB role switch
39 * Set USB role @role for @sw.
41 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
45 if (IS_ERR_OR_NULL(sw)) in usb_role_switch_set_role()
48 mutex_lock(&sw->lock); in usb_role_switch_set_role()
50 ret = sw->set(sw->dev.parent, role); in usb_role_switch_set_role()
52 sw->role = role; in usb_role_switch_set_role()
54 mutex_unlock(&sw->lock); in usb_role_switch_set_role()
[all …]
/kernel/linux/linux-5.10/arch/parisc/include/asm/
Dfloppy.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
23 (!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
28 #define SW fd_routine[use_virtual_dma&1] macro
40 #define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
41 #define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
42 #define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io) argument
77 for (lcount = virtual_dma_count; lcount; lcount--) { in floppy_hardint()
195 static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) in vdma_dma_setup() argument
199 virtual_dma_mode = (mode == DMA_MODE_WRITE); in vdma_dma_setup()
[all …]
/kernel/linux/linux-4.19/arch/alpha/include/uapi/asm/
Dfpu.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
7 * Alpha floating-point control register defines:
25 #define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */
27 #define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */
35 * IEEE trap enables are implemented in software. These per-thread
38 * floating-point enable bit (which is architected). On top of that,
88 * receive my thanks for making all the not-implemented fpcr bits
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()
[all …]

12345678910>>...43