Home
last modified time | relevance | path

Searched +full:role +full:- +full:switch +full:- +full:default +full:- +full:mode (Results 1 – 25 of 219) sorted by relevance

123456789

/Linux-v6.1/Documentation/devicetree/bindings/usb/
Dmediatek,mtu3.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 ---
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
11 - Chunfeng Yun <chunfeng.yun@mediatek.com>
14 - $ref: "usb-drd.yaml"
23 - enum:
24 - mediatek,mt2712-mtu3
25 - mediatek,mt8173-mtu3
26 - mediatek,mt8183-mtu3
27 - mediatek,mt8188-mtu3
[all …]
Dusb-drd.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/usb/usb-drd.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 otg-rev:
16 which the device and its descriptors are compliant, in binary-coded
18 features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
25 Tells Dual-Role USB controllers that we want to work on a particular
26 mode. In case this attribute isn't passed via DT, USB DRD controllers
[all …]
Ddwc2.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Rob Herring <robh@kernel.org>
13 - $ref: usb-drd.yaml#
14 - $ref: usb-hcd.yaml#
19 - const: brcm,bcm2835-usb
20 - const: hisilicon,hi6220-usb
21 - const: ingenic,jz4775-otg
22 - const: ingenic,jz4780-otg
[all …]
/Linux-v6.1/drivers/usb/cdns3/
DKconfig8 dual-role controller.
9 It supports: dual-role switch, Host-only, and Peripheral-only.
17 tristate "Cadence USB3 Dual-Role Controller"
20 Say Y here if your system has a Cadence USB3 dual-role controller.
21 It supports: dual-role switch, Host-only, and Peripheral-only.
34 Cadence USBSS-DEV driver.
36 This controller supports FF, HS and SS mode. It doesn't support
37 LS and SSP mode.
51 tristate "Cadence USB3 support on PCIe-based platforms"
53 default USB_CDNS3
[all …]
Dcore.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2018-2019 Cadence.
6 * Copyright (C) 2017-2018 NXP
14 #include <linux/dma-mapping.h>
23 #include "host-export.h"
28 static int cdns_role_start(struct cdns *cdns, enum usb_role role) in cdns_role_start() argument
32 if (WARN_ON(role > USB_ROLE_DEVICE)) in cdns_role_start()
35 mutex_lock(&cdns->mutex); in cdns_role_start()
36 cdns->role = role; in cdns_role_start()
37 mutex_unlock(&cdns->mutex); in cdns_role_start()
[all …]
/Linux-v6.1/drivers/usb/mtu3/
Dmtu3_dr.c1 // SPDX-License-Identifier: GPL-2.0
3 * mtu3_dr.c - dual role switch and host glue layer
24 mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION); in toggle_opstate()
25 mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN); in toggle_opstate()
28 /* only port0 supports dual-role mode */
32 void __iomem *ibase = ssusb->ippc_base; in ssusb_port0_switch()
35 dev_dbg(ssusb->dev, "%s (switch u%d port0 to %s)\n", __func__, in ssusb_port0_switch()
44 /* 2. power on, enable u2 port0 and select its mode */ in ssusb_port0_switch()
56 /* 2. power on, enable u3 port0 and select its mode */ in ssusb_port0_switch()
71 dev_dbg(ssusb->dev, "%s\n", __func__); in switch_port_to_host()
[all …]
Dmtu3.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * mtu3.h - MediaTek USB3 DRD header
25 #include <linux/usb/role.h>
34 #define MU3D_EP_TXCR0(epnum) (U3D_TX1CSR0 + (((epnum) - 1) * 0x10))
35 #define MU3D_EP_TXCR1(epnum) (U3D_TX1CSR1 + (((epnum) - 1) * 0x10))
36 #define MU3D_EP_TXCR2(epnum) (U3D_TX1CSR2 + (((epnum) - 1) * 0x10))
38 #define MU3D_EP_RXCR0(epnum) (U3D_RX1CSR0 + (((epnum) - 1) * 0x10))
39 #define MU3D_EP_RXCR1(epnum) (U3D_RX1CSR1 + (((epnum) - 1) * 0x10))
40 #define MU3D_EP_RXCR2(epnum) (U3D_RX1CSR2 + (((epnum) - 1) * 0x10))
42 #define USB_QMU_TQHIAR(epnum) (U3D_TXQHIAR1 + (((epnum) - 1) * 0x4))
[all …]
Dmtu3_plat.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-mapping.h>
22 /* u2-port0 should be powered on and enabled; */
25 void __iomem *ibase = ssusb->ippc_base; in ssusb_check_clocks()
35 dev_err(ssusb->dev, "clks of sts1 are not stable!\n"); in ssusb_check_clocks()
42 dev_err(ssusb->dev, "mac2 clock is not stable\n"); in ssusb_check_clocks()
55 if (!ssusb->is_host) in wait_for_ip_sleep()
61 /* wait for ip enter sleep mode */ in wait_for_ip_sleep()
62 ret = readl_poll_timeout(ssusb->ippc_base + U3D_SSUSB_IP_PW_STS1, value, in wait_for_ip_sleep()
65 dev_err(ssusb->dev, "ip sleep failed!!!\n"); in wait_for_ip_sleep()
[all …]
/Linux-v6.1/drivers/usb/dwc3/
Ddrd.c1 // SPDX-License-Identifier: GPL-2.0
3 * drd.c - DesignWare USB3 DRD Controller Dual-role support
5 * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com
21 u32 reg = dwc3_readl(dwc->regs, DWC3_OEVTEN); in dwc3_otg_disable_events()
24 dwc3_writel(dwc->regs, DWC3_OEVTEN, reg); in dwc3_otg_disable_events()
29 u32 reg = dwc3_readl(dwc->regs, DWC3_OEVTEN); in dwc3_otg_enable_events()
32 dwc3_writel(dwc->regs, DWC3_OEVTEN, reg); in dwc3_otg_enable_events()
37 u32 reg = dwc3_readl(dwc->regs, DWC3_OEVT); in dwc3_otg_clear_events()
39 dwc3_writel(dwc->regs, DWC3_OEVTEN, reg); in dwc3_otg_clear_events()
56 spin_lock(&dwc->lock); in dwc3_otg_thread_irq()
[all …]
/Linux-v6.1/drivers/usb/dwc2/
Ddrd.c1 // SPDX-License-Identifier: GPL-2.0
3 * drd.c - DesignWare USB2 DRD Controller Dual-role support
13 #include <linux/usb/role.h>
25 spin_lock_irqsave(&hsotg->lock, flags); in dwc2_ovr_init()
30 if (hsotg->role_sw_default_mode == USB_DR_MODE_HOST) in dwc2_ovr_init()
32 else if (hsotg->role_sw_default_mode == USB_DR_MODE_PERIPHERAL) in dwc2_ovr_init()
36 spin_unlock_irqrestore(&hsotg->lock, flags); in dwc2_ovr_init()
38 dwc2_force_mode(hsotg, (hsotg->dr_mode == USB_DR_MODE_HOST)); in dwc2_ovr_init()
45 /* Check if A-Session is already in the right state */ in dwc2_ovr_avalid()
48 return -EALREADY; in dwc2_ovr_avalid()
[all …]
/Linux-v6.1/Documentation/driver-api/usb/
Dtypec.rst3 USB Type-C connector class
7 ------------
9 The typec class is meant for describing the USB Type-C ports in a system to the
14 The platforms are expected to register every USB Type-C port they have with the
15 class. In a normal case the registration will be done by a USB Type-C or PD PHY
18 considers the component registering the USB Type-C ports with the class as "port
26 attributes are described in Documentation/ABI/testing/sysfs-class-typec.
29 --------------------
36 "port0-partner". Full path to the device would be
37 /sys/class/typec/port0/port0-partner/.
[all …]
/Linux-v6.1/drivers/usb/musb/
Dmediatek.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/dma-mapping.h>
15 #include <linux/usb/role.h>
50 enum usb_role role; member
56 struct device *dev = glue->dev; in mtk_musb_clks_get()
58 glue->clks[0].id = "main"; in mtk_musb_clks_get()
59 glue->clks[1].id = "mcu"; in mtk_musb_clks_get()
60 glue->clks[2].id = "univpll"; in mtk_musb_clks_get()
62 return devm_clk_bulk_get(dev, MTK_MUSB_CLKS_NUM, glue->clks); in mtk_musb_clks_get()
65 static int mtk_otg_switch_set(struct mtk_glue *glue, enum usb_role role) in mtk_otg_switch_set() argument
[all …]
/Linux-v6.1/drivers/usb/typec/tipd/
Dcore.c1 // SPDX-License-Identifier: GPL-2.0
17 #include <linux/usb/role.h>
110 static const char *tps6598x_psy_name_prefix = "tps6598x-source-psy-";
125 return -EINVAL; in tps6598x_block_read()
127 if (!tps->i2c_protocol) in tps6598x_block_read()
128 return regmap_raw_read(tps->regmap, reg, val, len); in tps6598x_block_read()
130 ret = regmap_raw_read(tps->regmap, reg, data, len + 1); in tps6598x_block_read()
135 return -EIO; in tps6598x_block_read()
147 return -EINVAL; in tps6598x_block_write()
149 if (!tps->i2c_protocol) in tps6598x_block_write()
[all …]
/Linux-v6.1/drivers/usb/chipidea/
Dcore.c1 // SPDX-License-Identifier: GPL-2.0
3 * core.c - ChipIdea USB IP core family device controller
5 * Copyright (C) 2008 Chipidea - MIPS Technologies, Inc. All rights reserved.
12 * - Four transfers are supported, usbtest is passed
13 * - USB Certification for gadget: CH9 and Mass Storage are passed
14 * - Low power mode
15 * - USB wakeup
19 #include <linux/dma-mapping.h>
105 ci->hw_bank.regmap[i] = in hw_alloc_regmap()
106 (i <= CAP_LAST ? ci->hw_bank.cap : ci->hw_bank.op) + in hw_alloc_regmap()
[all …]
/Linux-v6.1/drivers/usb/typec/ucsi/
Ducsi.c1 // SPDX-License-Identifier: GPL-2.0
3 * USB Type-C Connector System Software Interface driver
21 * UCSI_TIMEOUT_MS - PPM communication timeout
31 * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
46 return ucsi->ops->sync_write(ucsi, UCSI_CONTROL, &ctrl, sizeof(ctrl)); in ucsi_acknowledge_command()
56 return ucsi->ops->sync_write(ucsi, UCSI_CONTROL, &ctrl, sizeof(ctrl)); in ucsi_acknowledge_connector_change()
75 ret = ucsi->ops->read(ucsi, UCSI_MESSAGE_IN, &error, sizeof(error)); in ucsi_read_error()
83 switch (error) { in ucsi_read_error()
85 return -EOPNOTSUPP; in ucsi_read_error()
87 return -ECOMM; in ucsi_read_error()
[all …]
/Linux-v6.1/drivers/extcon/
Dextcon-axp288.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * extcon-axp288.c - X-Power AXP288 PMIC extcon cable detection driver
5 * Copyright (c) 2017-2018 Hans de Goede <hdegoede@redhat.com>
19 #include <linux/extcon-provider.h>
22 #include <linux/usb/role.h>
26 #include <asm/intel-family.h>
137 ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val); in axp288_extcon_log_rsi()
139 dev_err(info->dev, "failed to read reset source indicator\n"); in axp288_extcon_log_rsi()
143 bits = val & GENMASK(ARRAY_SIZE(axp288_pwr_up_down_info) - 1, 0); in axp288_extcon_log_rsi()
145 dev_dbg(info->dev, "%s\n", axp288_pwr_up_down_info[i]); in axp288_extcon_log_rsi()
[all …]
/Linux-v6.1/drivers/usb/typec/
Dwusb3801.c1 // SPDX-License-Identifier: GPL-2.0
3 * Willsemi WUSB3801 Type-C port controller driver
101 switch (wusb3801->port_type) { in wusb3801_get_default_role()
107 default: in wusb3801_get_default_role()
108 if (wusb3801->cap.prefer_role == TYPEC_SOURCE) in wusb3801_get_default_role()
116 switch (type) { in wusb3801_map_port_type()
122 default: in wusb3801_map_port_type()
127 static int wusb3801_map_pwr_opmode(enum typec_pwr_opmode mode) in wusb3801_map_pwr_opmode() argument
129 switch (mode) { in wusb3801_map_pwr_opmode()
131 default: in wusb3801_map_pwr_opmode()
[all …]
Danx7411.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Driver for Analogix ANX7411 USB Type-C and PD controller
23 #include <linux/usb/role.h>
336 int mode; in anx7411_detect_power_mode() local
338 ret = anx7411_reg_read(ctx->spi_client, REQUEST_CURRENT); in anx7411_detect_power_mode()
342 ctx->typec.request_current = ret * CURRENT_UNIT; /* 50ma per unit */ in anx7411_detect_power_mode()
344 ret = anx7411_reg_read(ctx->spi_client, REQUEST_VOLTAGE); in anx7411_detect_power_mode()
348 ctx->typec.request_voltage = ret * VOLTAGE_UNIT; /* 100mv per unit */ in anx7411_detect_power_mode()
350 if (ctx->psy_online == ANX7411_PSY_OFFLINE) { in anx7411_detect_power_mode()
351 ctx->psy_online = ANX7411_PSY_FIXED_ONLINE; in anx7411_detect_power_mode()
[all …]
/Linux-v6.1/drivers/usb/typec/mux/
Dintel_pmc_mux.c1 // SPDX-License-Identifier: GPL-2.0
14 #include <linux/usb/role.h>
42 /* Alt Mode Request */
59 /* Common Mode Data bits */
65 /* DP specific Mode Data bits */
68 /* TBT specific Mode Data bits */
89 /* activity type: Safe Mode */
129 enum usb_role role; member
152 /* SoC expects the USB Type-C port numbers to start with 0 */ in update_port_status()
153 port_num = port->usb3_port - 1; in update_port_status()
[all …]
/Linux-v6.1/Documentation/ABI/testing/
Dsysfs-driver-bd9571mwv-regulator1 What: /sys/bus/i2c/devices/.../bd9571mwv-regulator.*.auto/backup_mode
5 Description: Read/write the current state of DDR Backup Mode, which controls
10 A. With a momentary power switch (or pulse signal), DDR
11 Backup Mode is enabled by default when available, as the
13 B. With a toggle power switch (or level signal), the
16 1. Configure PMIC for backup mode, to change the role of
17 the accessory power switch from a power switch to a
18 wake-up switch,
19 2. Switch accessory power switch off, to prepare for
23 4. Switch accessory power switch on, to resume the
[all …]
/Linux-v6.1/drivers/net/ethernet/intel/ice/
Dice_lag.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2018-2021, Intel Corporation. */
10 * ice_lag_nop_handler - no-op Rx handler to disable LAG
19 * ice_lag_set_primary - set PF LAG state as Primary
24 struct ice_pf *pf = lag->pf; in ice_lag_set_primary()
29 if (lag->role != ICE_LAG_UNSET && lag->role != ICE_LAG_BACKUP) { in ice_lag_set_primary()
31 netdev_name(lag->netdev)); in ice_lag_set_primary()
35 lag->role = ICE_LAG_PRIMARY; in ice_lag_set_primary()
39 * ice_lag_set_backup - set PF LAG state to Backup
44 struct ice_pf *pf = lag->pf; in ice_lag_set_backup()
[all …]
/Linux-v6.1/drivers/platform/x86/intel/
Dchtwc_int33fe.c1 // SPDX-License-Identifier: GPL-2.0
12 * 3. FUSB302 USB Type-C Controller
13 * 4. PI3USB30532 USB switch
16 * instantiate I²C clients for chips 2 - 4, so that standard I²C drivers
38 * Grrr, I severely dislike buggy BIOS-es. At least one BIOS enumerates
62 static const char * const max17047_suppliers[] = { "bq24190-charger" };
65 PROPERTY_ENTRY_STRING_ARRAY("supplied-from", max17047_suppliers),
84 PROPERTY_ENTRY_STRING("linux,extcon-name", "cht_wcove_pwrsrc"),
85 PROPERTY_ENTRY_REF_ARRAY("usb-role-switch", fusb302_mux_refs),
115 PROPERTY_ENTRY_STRING("data-role", "dual"),
[all …]
/Linux-v6.1/drivers/media/tuners/
Dtda18271-fe.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 tda18271-fe.c - driver for the Philips / NXP TDA18271 silicon tuner
9 #include "tda18271-priv.h"
17 MODULE_PARM_DESC(debug, "set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))");
19 static int tda18271_cal_on_startup = -1;
26 /*---------------------------------------------------------------------*/
30 struct tda18271_priv *priv = fe->tuner_priv; in tda18271_toggle_output()
33 priv->output_opt & TDA18271_OUTPUT_LT_OFF ? 1 : 0, in tda18271_toggle_output()
34 priv->output_opt & TDA18271_OUTPUT_XT_OFF ? 1 : 0); in tda18271_toggle_output()
39 tda_dbg("%s mode: xtal oscillator %s, slave tuner loop through %s\n", in tda18271_toggle_output()
[all …]
/Linux-v6.1/include/linux/usb/
Dmusb.h1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC.
6 * Board initialization should put one of these into dev->platform_data,
7 * probably on some platform_device named "musb-hdrc". It encapsulates
14 /* The USB role is defined by the connector used on the board, so long as
19 MUSB_HOST, /* A or Mini-A connector */
20 MUSB_PERIPHERAL, /* B or Mini-B connector */
21 MUSB_OTG /* Mini-AB connector */
40 enum musb_buf_mode mode; member
48 .mode = m, \
[all …]
/Linux-v6.1/drivers/s390/net/
Dqeth_l2_main.c1 // SPDX-License-Identifier: GPL-2.0
37 switch (retcode) { in qeth_l2_setdelmac_makerc()
42 rc = -EOPNOTSUPP; in qeth_l2_setdelmac_makerc()
45 rc = -ENOSPC; in qeth_l2_setdelmac_makerc()
49 rc = -EADDRINUSE; in qeth_l2_setdelmac_makerc()
53 rc = -EADDRNOTAVAIL; in qeth_l2_setdelmac_makerc()
56 rc = -ENOENT; in qeth_l2_setdelmac_makerc()
58 default: in qeth_l2_setdelmac_makerc()
59 rc = -EIO; in qeth_l2_setdelmac_makerc()
71 return qeth_l2_setdelmac_makerc(card, cmd->hdr.return_code); in qeth_l2_send_setdelmac_cb()
[all …]

123456789